SbSphere — class for representing a sphere
Contents
Description
Represents a sphere in 3D. This is a lightweight datatype that is used for arguments or return values in
the Inventor toolkit. See SoSphere for a database sphere (used for rendering, picking, etc.).
Inherits From
SbSphere
Methods
SbSphere()SbSphere(constSbVec3f¢er,floatradius)
Constructors.
voidsetValue(constSbVec3f¢er,floatradius)
Change the center and radius.
voidsetCenter(constSbVec3f¢er)voidsetRadius(floatradius)
Set just the center or radius.
constSbVec3f&getCenter()constfloatgetRadius()const
Return the center and radius.
voidcircumscribe(constSbBox3f&box)
Return a sphere containing a given box.
SbBoolintersect(constSbLine&l,SbVec3f&intersection)constSbBoolintersect(constSbLine&l,SbVec3f&enter,SbVec3f&exit)const
Intersect line and sphere, returning TRUE if there is an intersection. The line is treated as a ray.
Name
SbSphere — class for representing a sphere
See Also
SbVec3f,SbLine,SoSphereSbSphere(3IV)()
Synopsis
#include<Inventor/SbLinear.h>
Methods from class SbSphere:
SbSphere()SbSphere(constSbVec3f¢er,floatradius)voidsetValue(constSbVec3f¢er,floatradius)voidsetCenter(constSbVec3f¢er)voidsetRadius(floatradius)constSbVec3f&getCenter()constfloatgetRadius()constvoidcircumscribe(constSbBox3f&box)SbBoolintersect(constSbLine&l,SbVec3f&intersection)constSbBoolintersect(constSbLine&l,SbVec3f&enter,SbVec3f&exit)const