This is a generic sphere class used for spacial queries. More...
#include <sphere.h>
Public Types | |
typedef std::pair< Boolean, Ray > | RayTestResult |
This is a type used for the return of a ray intersection test. More... | |
Public Member Functions | |
Sphere () | |
Blank constructor. | |
Sphere (const Sphere &Other) | |
Copy constructor. More... | |
Sphere (const Real SphereRadius) | |
Radius constructor. More... | |
Sphere (const Vector3 &SphereCenter, const Real SphereRadius) | |
Descriptive constructor. More... | |
Sphere (const Ogre::Sphere &InternalSphere) | |
Internal constructor. More... | |
~Sphere () | |
Class destructor. | |
void | ExtractOgreSphere (const Ogre::Sphere &InternalSphere) |
Changes this Sphere to match the Ogre Sphere. More... | |
Ogre::Sphere | GetOgreSphere () const |
Gets an Ogre::Sphere that contains this Spheres information. More... | |
RayTestResult | Intersects (const Ray &ToCheck) const |
Checks to see if a ray intersects this sphere. More... | |
Boolean | IsInside (const Vector3 &ToCheck) const |
Checks to see if a point is inside this sphere. More... | |
Boolean | IsOverlapping (const Sphere &ToCheck) const |
Checks to see if another sphere overlaps with this one. More... | |
Boolean | IsOverlapping (const AxisAlignedBox &ToCheck) const |
Checks to see if an AABB overlaps with this sphere. More... | |
Boolean | IsOverlapping (const Plane &ToCheck) const |
Checks to see if a plane intersects this sphere. More... | |
Boolean | operator!= (const Sphere &Other) const |
Inequality operator. More... | |
Boolean | operator< (const Sphere &Other) const |
Greater-than or equals-to operator. More... | |
Boolean | operator<= (const Sphere &Other) const |
Less-than or equals-to operator. More... | |
void | operator= (const Sphere &Other) |
Assignment operator. More... | |
void | operator= (const Ogre::Sphere &InternalSphere) |
The assignment operator from Ogre::Sphere to Mezzanine::Sphere. More... | |
Boolean | operator== (const Sphere &Other) const |
Equality operator. More... | |
Boolean | operator> (const Sphere &Other) const |
Greater-than operator. More... | |
Boolean | operator>= (const Sphere &Other) const |
Less-than operator. More... | |
void | ProtoDeSerialize (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite this object with it. More... | |
void | ProtoSerialize (XML::Node &ParentNode) const |
Convert this class to an XML::Node ready for serialization. More... | |
Static Public Member Functions | |
static String | GetSerializableName () |
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More... | |
Public Attributes | |
Vector3 | Center |
The point in world space that is the center of the sphere. | |
Real | Radius |
The radius of the sphere. | |
typedef std::pair<Boolean,Ray> Mezzanine::Sphere::RayTestResult |
This is a type used for the return of a ray intersection test.
This type provides more verbose return data that can be used for further tests.
The first member stores whether or not there was a hit. The second member stores ray containing the points where the ray entered and exited the sphere.
Mezzanine::Sphere::Sphere | ( | const Sphere & | Other) |
Copy constructor.
Other | The other sphere to copy from. |
Definition at line 62 of file sphere.cpp.
Mezzanine::Sphere::Sphere | ( | const Real | SphereRadius) |
Radius constructor.
SphereRadius | The radius of the sphere. |
Definition at line 67 of file sphere.cpp.
Descriptive constructor.
SphereCenter | The point in world space that is the center of the sphere. |
SphereRadius | The radius of the sphere. |
Definition at line 71 of file sphere.cpp.
|
explicit |
Internal constructor.
Definition at line 76 of file sphere.cpp.
void Mezzanine::Sphere::ExtractOgreSphere | ( | const Ogre::Sphere & | InternalSphere) |
Changes this Sphere to match the Ogre Sphere.
InternalSphere | The Ogre::Sphere to copy. |
Definition at line 103 of file sphere.cpp.
Ogre::Sphere Mezzanine::Sphere::GetOgreSphere | ( | ) | const |
Gets an Ogre::Sphere that contains this Spheres information.
Definition at line 106 of file sphere.cpp.
|
static |
Get the name of the the XML tag the proxy class will leave behind as its instances are serialized.
Definition at line 152 of file sphere.cpp.
Sphere::RayTestResult Mezzanine::Sphere::Intersects | ( | const Ray & | ToCheck) | const |
Checks to see if a ray intersects this sphere.
ToCheck | The ray to check for a hit. |
Definition at line 97 of file sphere.cpp.
Boolean Mezzanine::Sphere::IsInside | ( | const Vector3 & | ToCheck) | const |
Checks to see if a point is inside this sphere.
ToCheck | The location to check to see if it is within this sphere. |
Definition at line 85 of file sphere.cpp.
Boolean Mezzanine::Sphere::IsOverlapping | ( | const Sphere & | ToCheck) | const |
Checks to see if another sphere overlaps with this one.
ToCheck | The other sphere to check for overlap. |
Definition at line 88 of file sphere.cpp.
Boolean Mezzanine::Sphere::IsOverlapping | ( | const AxisAlignedBox & | ToCheck) | const |
Checks to see if an AABB overlaps with this sphere.
ToCheck | The AABB to check for overlap. |
Definition at line 91 of file sphere.cpp.
Boolean Mezzanine::Sphere::IsOverlapping | ( | const Plane & | ToCheck) | const |
Checks to see if a plane intersects this sphere.
ToCheck | The plane to check for intersection. |
Definition at line 94 of file sphere.cpp.
Boolean Mezzanine::Sphere::operator!= | ( | const Sphere & | Other) | const |
Inequality operator.
Other | The other Sphere to compare with. |
Definition at line 181 of file sphere.cpp.
Boolean Mezzanine::Sphere::operator< | ( | const Sphere & | Other) | const |
Greater-than or equals-to operator.
Other | The other Sphere to compare with. |
Definition at line 169 of file sphere.cpp.
Boolean Mezzanine::Sphere::operator<= | ( | const Sphere & | Other) | const |
Less-than or equals-to operator.
Other | The other Sphere to compare with. |
Definition at line 175 of file sphere.cpp.
void Mezzanine::Sphere::operator= | ( | const Sphere & | Other) |
Assignment operator.
Other | The other Sphere to copy from. |
Definition at line 160 of file sphere.cpp.
void Mezzanine::Sphere::operator= | ( | const Ogre::Sphere & | InternalSphere) |
The assignment operator from Ogre::Sphere to Mezzanine::Sphere.
InternalSphere | The Ogre::Sphere to take data from. |
Definition at line 163 of file sphere.cpp.
Boolean Mezzanine::Sphere::operator== | ( | const Sphere & | Other) | const |
Equality operator.
Other | The other Sphere to compare with. |
Definition at line 178 of file sphere.cpp.
Boolean Mezzanine::Sphere::operator> | ( | const Sphere & | Other) | const |
Greater-than operator.
Other | The other Sphere to compare with. |
Definition at line 166 of file sphere.cpp.
Boolean Mezzanine::Sphere::operator>= | ( | const Sphere & | Other) | const |
Less-than operator.
Other | The other Sphere to compare with. |
Definition at line 172 of file sphere.cpp.
void Mezzanine::Sphere::ProtoDeSerialize | ( | const XML::Node & | SelfRoot) |
Take the data stored in an XML Node and overwrite this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 128 of file sphere.cpp.
void Mezzanine::Sphere::ProtoSerialize | ( | XML::Node & | ParentNode) | const |
Convert this class to an XML::Node ready for serialization.
ParentNode | The point in the XML hierarchy that all this renderable should be appended to. |
Definition at line 112 of file sphere.cpp.