Open Inventor Reference
SbSphere Class Reference

Class for representing a sphere. More...

#include <Inventor/SbLinear.h>

List of all members.

Public Member Functions

 SbSphere ()
 Constructors.
 SbSphere (const SbVec3f &c, float r)
 Construct a sphere given center and radius.
void setValue (const SbVec3f &c, float r)
 Change the center and radius.
void setCenter (const SbVec3f &c)
 Set just the center or radius.
void setRadius (float r)
 Set just the center or radius.
const SbVec3fgetCenter () const
 Return the center and radius.
float getRadius () const
 Return the center and radius.
void circumscribe (const SbBox3f &box)
 Return a sphere containing a given box.
SbBool intersect (const SbLine &l, SbVec3f &intersection) const
 Intersect line and sphere, returning TRUE if there is an intersection.
SbBool intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const

Detailed 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.). {}

See Also
SbVec3f, SbLine, SoSphere

Definition at line 1370 of file SbLinear.h.


Constructor & Destructor Documentation

SbSphere::SbSphere ( ) [inline]

Definition at line 1374 of file SbLinear.h.

SbSphere::SbSphere ( const SbVec3f c,
float  r 
)

Member Function Documentation

void SbSphere::circumscribe ( const SbBox3f box)
const SbVec3f& SbSphere::getCenter ( ) const [inline]

Definition at line 1388 of file SbLinear.h.

float SbSphere::getRadius ( ) const [inline]

Definition at line 1390 of file SbLinear.h.

SbBool SbSphere::intersect ( const SbLine l,
SbVec3f enter,
SbVec3f exit 
) const
SbBool SbSphere::intersect ( const SbLine l,
SbVec3f intersection 
) const
void SbSphere::setCenter ( const SbVec3f c)
void SbSphere::setRadius ( float  r)
void SbSphere::setValue ( const SbVec3f c,
float  r 
)

The documentation for this class was generated from the following file: