A sphere primitive, mostly used for bounds checking. More...
#include <OgreSphere.h>
Public Member Functions | |
Sphere () | |
Standard constructor - creates a unit sphere around the origin. More... | |
Sphere (const Vector3 ¢er, Real radius) | |
Constructor allowing arbitrary spheres. More... | |
const Vector3 & | getCenter (void) const |
Returns the center point of the sphere. More... | |
Real | getRadius (void) const |
Returns the radius of the sphere. More... | |
bool | intersects (const Sphere &s) const |
Returns whether or not this sphere intersects another sphere. More... | |
bool | intersects (const AxisAlignedBox &box) const |
Returns whether or not this sphere intersects a box. More... | |
bool | intersects (const Plane &plane) const |
Returns whether or not this sphere intersects a plane. More... | |
bool | intersects (const Vector3 &v) const |
Returns whether or not this sphere intersects a point. More... | |
void | setCenter (const Vector3 ¢er) |
Sets the center point of the sphere. More... | |
void | setRadius (Real radius) |
Sets the radius of the sphere. More... | |
Protected Attributes | |
Vector3 | mCenter |
Real | mRadius |
A sphere primitive, mostly used for bounds checking.
Definition at line 51 of file OgreSphere.h.
|
inline |
Standard constructor - creates a unit sphere around the origin.
Definition at line 58 of file OgreSphere.h.
Constructor allowing arbitrary spheres.
center | The center point of the sphere. |
radius | The radius of the sphere. |
Definition at line 63 of file OgreSphere.h.
|
inline |
Returns the center point of the sphere.
Definition at line 73 of file OgreSphere.h.
Referenced by Ogre::PlaneBoundedVolume::intersects().
|
inline |
Returns the radius of the sphere.
Definition at line 67 of file OgreSphere.h.
Referenced by Ogre::PlaneBoundedVolume::intersects().
|
inline |
Returns whether or not this sphere intersects another sphere.
Definition at line 79 of file OgreSphere.h.
References mCenter, mRadius, and Ogre::Math::Sqr().
|
inline |
Returns whether or not this sphere intersects a box.
Definition at line 85 of file OgreSphere.h.
References Ogre::Math::intersects().
|
inline |
Returns whether or not this sphere intersects a plane.
Definition at line 90 of file OgreSphere.h.
References Ogre::Math::intersects().
|
inline |
Returns whether or not this sphere intersects a point.
Definition at line 95 of file OgreSphere.h.
References Ogre::Math::Sqr().
|
inline |
Sets the center point of the sphere.
Definition at line 76 of file OgreSphere.h.
|
inline |
Sets the radius of the sphere.
Definition at line 70 of file OgreSphere.h.
|
protected |
Definition at line 55 of file OgreSphere.h.
Referenced by intersects().
|
protected |
Definition at line 54 of file OgreSphere.h.
Referenced by intersects().