Class for representing a sphere. More...
#include <Inventor/SbSphere.h>
Public Member Functions | |
| SbSphere () | |
| SbSphere (const SbVec3f &c, float r) | |
| void | setValue (const SbVec3f &c, float r) |
| void | setCenter (const SbVec3f &c) |
| void | setRadius (float r) |
| const SbVec3f & | getCenter () const |
| float | getRadius () const |
| void | circumscribe (const SbBox3f &box) |
| SbBool | intersect (const SbLine &l, SbVec3f &intersection) const |
| SbBool | intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const |
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.).
| SbSphere::SbSphere | ( | ) | [inline] |
Default constructor.
The sphere is not initialized.
| 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.
| const SbVec3f& SbSphere::getCenter | ( | ) | const [inline] |
Return the center.
| float SbSphere::getRadius | ( | ) | const [inline] |
Return the radius.
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.