Class for representing a sphere. More...
#include <Inventor/SbSphere.h>
Public Member Functions | |
SbSphere () | |
Default constructor. | |
SbSphere (const SbVec3f &c, float r) | |
Constructor that takes a center and a radius. | |
void | setValue (const SbVec3f &c, float r) |
Change the center and radius. | |
void | setCenter (const SbVec3f &c) |
Set the center. | |
void | setRadius (float r) |
Set the radius. | |
const SbVec3f & | getCenter () const |
Return the center. | |
float | getRadius () const |
Return the 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 |
Intersect line and sphere, returning TRUE if there is an intersection. | |
Class for representing a sphere.
Represents a sphere in 3D. This is a lightweight datatype that is used for arguments or return values in the Open Inventor toolkit. See SoSphere for a database sphere (used for rendering, picking, etc.).
Definition at line 57 of file SbSphere.h.
|
inline |
SbSphere::SbSphere | ( | const SbVec3f & | c, |
float | r | ||
) |
Constructor that takes a center and a radius.
void SbSphere::circumscribe | ( | const SbBox3f & | box | ) |
Return a sphere containing a given box.
|
inline |
Return the center.
Definition at line 87 of file SbSphere.h.
|
inline |
Return the radius.
Definition at line 91 of file SbSphere.h.
Intersect line and sphere, returning TRUE if there is an intersection.
The line is treated as a ray.
Intersect line and sphere, returning TRUE if there is an intersection.
The line is treated as a ray.
void SbSphere::setCenter | ( | const SbVec3f & | c | ) |
Set the center.
void SbSphere::setRadius | ( | float | r | ) |
Set the radius.
void SbSphere::setValue | ( | const SbVec3f & | c, |
float | r | ||
) |
Change the center and radius.