OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
Holds a solid representation of a convex body. More...
#include <OgreConvexBody.h>
Public Types | |
typedef std::vector< Polygon * > | PolygonList |
Public Member Functions | |
ConvexBody () | |
ConvexBody (const ConvexBody &cpy) | |
~ConvexBody () | |
void | clip (const AxisAlignedBox &aab) |
Clips the body with an AAB. | |
void | clip (const ConvexBody &body) |
Clips the body with another body. | |
void | clip (const Frustum &frustum) |
Clips the body with a frustum. | |
void | clip (const Plane &pl, bool keepNegative=true) |
Clips the object by the positive half space of a plane. | |
void | define (const AxisAlignedBox &aab) |
Build a new polygon representation from an AAB. | |
void | define (const Frustum &frustum) |
Build a new polygon representation from a frustum. | |
void | extend (const Vector3 &pt) |
Extends the existing body to incorporate the passed in point as a convex hull. | |
AxisAlignedBox | getAABB (void) const |
Returns an AABB representation. | |
const Vector3 & | getNormal (size_t poly) |
Returns the normal of a specified polygon. | |
const Polygon & | getPolygon (size_t poly) const |
Returns a polygon. | |
size_t | getPolygonCount (void) const |
Returns the current number of polygons. | |
const Vector3 & | getVertex (size_t poly, size_t vertex) const |
Returns a specific vertex of a polygon. | |
size_t | getVertexCount (size_t poly) const |
Returns the number of vertices for a polygon. | |
bool | hasClosedHull (void) const |
Checks if the body has a closed hull. | |
void | mergePolygons (void) |
Merges all neighboring polygons into one single polygon if they are lay in the same plane. | |
bool | operator!= (const ConvexBody &rhs) const |
Determines if the current object is not equal to the compared one. | |
bool | operator== (const ConvexBody &rhs) const |
Determines if the current object is equal to the compared one. | |
void | reset (void) |
Resets the object. | |
Static Public Member Functions | |
static void | _destroyPool () |
Tear down the internal polygon pool used to minimise allocations. | |
static void | _initialisePool () |
Initialise the internal polygon pool used to minimise allocations. | |
Holds a solid representation of a convex body.
Administers a convex body. All polygons of the body are convex and planar. Several operations may be applied, ranging from intersection to join where each result it itself a convex body.
typedef std::vector< Polygon* > Ogre::ConvexBody::PolygonList |
Ogre::ConvexBody::ConvexBody | ( | ) |
Ogre::ConvexBody::~ConvexBody | ( | ) |
Ogre::ConvexBody::ConvexBody | ( | const ConvexBody & | cpy | ) |
Build a new polygon representation from a frustum.
void Ogre::ConvexBody::define | ( | const AxisAlignedBox & | aab | ) |
Build a new polygon representation from an AAB.
Clips the body with a frustum.
The resulting holes are filled with new polygons.
void Ogre::ConvexBody::clip | ( | const AxisAlignedBox & | aab | ) |
Clips the body with an AAB.
The resulting holes are filled with new polygons.
void Ogre::ConvexBody::clip | ( | const ConvexBody & | body | ) |
Clips the body with another body.
Clips the object by the positive half space of a plane.
Extends the existing body to incorporate the passed in point as a convex hull.
You must already have constructed a basic body using a 'construct' method.
Returns the number of vertices for a polygon.
Returns a specific vertex of a polygon.
Returns the normal of a specified polygon.
AxisAlignedBox Ogre::ConvexBody::getAABB | ( | void | ) | const |
Returns an AABB representation.
Merges all neighboring polygons into one single polygon if they are lay in the same plane.
bool Ogre::ConvexBody::operator== | ( | const ConvexBody & | rhs | ) | const |
Determines if the current object is equal to the compared one.
|
inline |
Determines if the current object is not equal to the compared one.
Initialise the internal polygon pool used to minimise allocations.
Tear down the internal polygon pool used to minimise allocations.