OGRE
2.2.4
Object-Oriented Graphics Rendering Engine
|
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 | merge (const Sphere &oth) |
Merges another Sphere into the current sphere. 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... | |
A sphere primitive, mostly used for bounds checking.
|
inline |
Standard constructor - creates a unit sphere around the origin.
Constructor allowing arbitrary spheres.
center | The center point of the sphere. |
radius | The radius of the sphere. |
|
inline |
Returns the center point of the sphere.
Referenced by Ogre::PlaneBoundedVolume::intersects(), merge(), Ogre::ArraySphere::setAll(), and Ogre::ArraySphere::setFromSphere().
|
inline |
Returns the radius of the sphere.
Referenced by Ogre::PlaneBoundedVolume::intersects(), merge(), Ogre::ArraySphere::setAll(), and Ogre::ArraySphere::setFromSphere().
|
inline |
Returns whether or not this sphere intersects another sphere.
References Ogre::Math::Sqr().
|
inline |
Returns whether or not this sphere intersects a box.
References Ogre::Math::intersects().
|
inline |
Returns whether or not this sphere intersects a plane.
References Ogre::Math::intersects().
|
inline |
Returns whether or not this sphere intersects a point.
References Ogre::Math::Sqr().
|
inline |
Merges another Sphere into the current sphere.
References getCenter(), getRadius(), Ogre::Math::Sqr(), Ogre::Math::Sqrt(), and Ogre::Vector3::squaredLength().
|
inline |
Sets the center point of the sphere.
Referenced by Ogre::ArraySphere::getAsSphere().
|
inline |
Sets the radius of the sphere.
Referenced by Ogre::ArraySphere::getAsSphere().