Package com.openinventor.inventor
Class SbSphere
- java.lang.Object
-
- com.openinventor.inventor.SbBasic
-
- com.openinventor.inventor.SbSphere
-
-
Field Summary
Fields Modifier and Type Field Description float[]array
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcircumscribe(SbBox3f box)Return a sphere containing a given box.SbVec3fgetCenter()Return the center.floatgetRadius()Return the radius.float[]getValue()SbVec3f[]intersect(SbLine l)Intersect line and sphere, returning true if there is an intersection.SbVec3fintersectFirst(SbLine l)Intersect line and sphere, returning true if there is an intersection.voidsetCenter(SbVec3f c)Set the center.voidsetRadius(float r)Set the radius.SbSpheresetValue(float[] components)SbSpheresetValue(float[] components, int startIndex)voidsetValue(SbSphere copyFrom)voidsetValue(SbVec3f c, float r)Change the center and radius.static SbSphere[]toArray(long nativeArray, long length)
-
-
-
Method Detail
-
getValue
public float[] getValue()
-
setValue
public SbSphere setValue(float[] components, int startIndex)
-
setValue
public void setValue(SbSphere copyFrom)
-
setValue
public SbSphere setValue(float[] components)
-
toArray
public static SbSphere[] toArray(long nativeArray, long length)
-
intersect
public SbVec3f[] intersect(SbLine l)
Intersect line and sphere, returning true if there is an intersection. The line is treated as a ray.
-
setRadius
public void setRadius(float r)
Set the radius.
-
setValue
public void setValue(SbVec3f c, float r)
Change the center and radius.
-
setCenter
public void setCenter(SbVec3f c)
Set the center.
-
circumscribe
public void circumscribe(SbBox3f box)
Return a sphere containing a given box.
-
intersectFirst
public SbVec3f intersectFirst(SbLine l)
Intersect line and sphere, returning true if there is an intersection. The line is treated as a ray.
-
getCenter
public SbVec3f getCenter()
Return the center.
-
getRadius
public float getRadius()
Return the radius.
-
-