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 void
circumscribe(SbBox3f box)
Return a sphere containing a given box.SbVec3f
getCenter()
Return the center.float
getRadius()
Return the radius.float[]
getValue()
SbVec3f[]
intersect(SbLine l)
Intersect line and sphere, returning true if there is an intersection.SbVec3f
intersectFirst(SbLine l)
Intersect line and sphere, returning true if there is an intersection.void
setCenter(SbVec3f c)
Set the center.void
setRadius(float r)
Set the radius.SbSphere
setValue(float[] components)
SbSphere
setValue(float[] components, int startIndex)
void
setValue(SbSphere copyFrom)
void
setValue(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.
-
-