SbSphere(3IV)
SbSphere (SbSph) - class for representing a sphere
As shipped in IRIX 6.5.22. Added in IRIX 6.5.22.
NAME SbSphere (SbSph) - class for representing a sphere INHERITS FROM SbSphere SYNOPSIS #include <Inventor_c/SbLinear.h> typedef SbSphere SbSph Functions from class SbSphere: void SbSphCircumscribe(SbSph *this, const SbBox3f *box) SbBool SbSphIntersect(const SbSph *this, const SbLine *l, SbVec3f *intersection) SbBool SbSphIntersect2(const SbSph *this, const SbLine *l, SbVec3f *enter, SbVec3f *exit) 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.). Note that there are no Create and Delete functions for SbSphere . C programmers should treat spheres as standard C structs (declare them locally or use malloc() ): /* This is defined in Inventor_c/SbLinear.h: */ struct { struct SbVec3f center; float radius; } /* Your code should look something like this: */ #include <Inventor_c/SbLinear.h> SbSphere s; s.radius = 5.0; SbV3fSetX_Y_Z( s.center, 0.0, 2.0, 0.0 ); FUNCTIONS void SbSphCircumscribe(SbSph *this, const SbBox3f *box) Return a sphere containing a given box. SbBool SbSphIntersect(const SbSph *this, const SbLine *l, SbVec3f *intersection) SbBool SbSphIntersect2(const SbSph *this, const SbLine *l, SbVec3f *enter, SbVec3f *exit) Intersect line and sphere, returning TRUE if there is an intersection. The line is treated as a ray. FILE FORMAT/DEFAULTS Sphere { } SEE ALSO SbVec3f, SbLine, SoSphere