Open Inventor Reference
SbSphere Class Reference

Class for representing a sphere. More...

#include <Inventor/SbLinear.h>

Public Member Functions

 SbSphere ()
 Constructors. More...
 
 SbSphere (const SbVec3f &c, float r)
 Construct a sphere given center and radius. More...
 
void setValue (const SbVec3f &c, float r)
 Change the center and radius. More...
 
void setCenter (const SbVec3f &c)
 Set just the center or radius. More...
 
void setRadius (float r)
 Set just the center or radius. More...
 
const SbVec3fgetCenter () const
 Return the center and radius. More...
 
float getRadius () const
 Return the center and radius. More...
 
void circumscribe (const SbBox3f &box)
 Return a sphere containing a given box. More...
 
bool intersect (const SbLine &l, SbVec3f &intersection) const
 Intersect line and sphere, returning TRUE if there is an intersection. More...
 
bool 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 1489 of file SbLinear.h.

Constructor & Destructor Documentation

◆ SbSphere() [1/2]

SbSphere::SbSphere ( )
inline

Definition at line 1493 of file SbLinear.h.

◆ SbSphere() [2/2]

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

Member Function Documentation

◆ circumscribe()

void SbSphere::circumscribe ( const SbBox3f box)

◆ getCenter()

const SbVec3f& SbSphere::getCenter ( ) const
inline

Definition at line 1507 of file SbLinear.h.

◆ getRadius()

float SbSphere::getRadius ( ) const
inline

Definition at line 1509 of file SbLinear.h.

◆ intersect() [1/2]

bool SbSphere::intersect ( const SbLine l,
SbVec3f enter,
SbVec3f exit 
) const

◆ intersect() [2/2]

bool SbSphere::intersect ( const SbLine l,
SbVec3f intersection 
) const

◆ setCenter()

void SbSphere::setCenter ( const SbVec3f c)

◆ setRadius()

void SbSphere::setRadius ( float  r)

◆ setValue()

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

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