OGRE
2.2.4
Object-Oriented Graphics Rendering Engine
|
Holds a solid representation of a convex body. More...
#include <OgreConvexBody.h>
Public Types | |
typedef vector< Polygon *>::type | PolygonList |
Public Member Functions | |
ConvexBody () | |
ConvexBody (const ConvexBody &cpy) | |
~ConvexBody () | |
void | clip (const Frustum &frustum) |
Clips the body with a frustum. More... | |
void | clip (const AxisAlignedBox &aab) |
Clips the body with an AAB. More... | |
void | clip (const ConvexBody &body) |
Clips the body with another body. More... | |
void | clip (const Plane &pl, bool keepNegative=true) |
Clips the object by the positive half space of a plane. More... | |
void | define (const Frustum &frustum) |
Build a new polygon representation from a frustum. More... | |
void | define (const AxisAlignedBox &aab) |
Build a new polygon representation from an AAB. More... | |
void | define (const Vector3 corners[8]) |
Build a new polygon representation from an axis-UNaligned box. More... | |
void | extend (const Vector3 &pt) |
Extends the existing body to incorporate the passed in point as a convex hull. More... | |
AxisAlignedBox | getAABB (void) const |
Returns an AABB representation. More... | |
const Vector3 & | getNormal (size_t poly) |
Returns the normal of a specified polygon. More... | |
const Polygon & | getPolygon (size_t poly) const |
Returns a polygon. More... | |
size_t | getPolygonCount (void) const |
Returns the current number of polygons. More... | |
const Vector3 & | getVertex (size_t poly, size_t vertex) const |
Returns a specific vertex of a polygon. More... | |
size_t | getVertexCount (size_t poly) const |
Returns the number of vertices for a polygon. More... | |
bool | hasClosedHull (void) const |
Checks if the body has a closed hull. More... | |
void | logInfo () const |
Log details of this body. More... | |
void | mergePolygons (void) |
Merges all neighboring polygons into one single polygon if they are lay in the same plane. More... | |
bool | operator!= (const ConvexBody &rhs) const |
Determines if the current object is not equal to the compared one. More... | |
bool | operator== (const ConvexBody &rhs) const |
Determines if the current object is equal to the compared one. More... | |
void | reset (void) |
Resets the object. More... | |
Static Public Member Functions | |
static void | _destroyPool () |
Tear down the internal polygon pool used to minimise allocations. More... | |
static void | _initialisePool () |
Initialise the internal polygon pool used to minimise allocations. More... | |
Friends | |
_OgreExport friend std::ostream & | operator<< (std::ostream &strm, const ConvexBody &body) |
Prints out the body with all its polygons. More... | |
Holds a solid representation of a convex body.
typedef vector< Polygon* >::type Ogre::ConvexBody::PolygonList |
Ogre::ConvexBody::ConvexBody | ( | ) |
Ogre::ConvexBody::~ConvexBody | ( | ) |
Ogre::ConvexBody::ConvexBody | ( | const ConvexBody & | cpy | ) |
|
static |
Tear down the internal polygon pool used to minimise allocations.
|
static |
Initialise the internal polygon pool used to minimise allocations.
void Ogre::ConvexBody::clip | ( | const Frustum & | frustum | ) |
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.
void Ogre::ConvexBody::clip | ( | const Plane & | pl, |
bool | keepNegative = true |
||
) |
Clips the object by the positive half space of a plane.
void Ogre::ConvexBody::define | ( | const Frustum & | frustum | ) |
Build a new polygon representation from a frustum.
void Ogre::ConvexBody::define | ( | const AxisAlignedBox & | aab | ) |
Build a new polygon representation from an AAB.
void Ogre::ConvexBody::define | ( | const Vector3 | corners[8] | ) |
Build a new polygon representation from an axis-UNaligned box.
void Ogre::ConvexBody::extend | ( | const Vector3 & | pt | ) |
Extends the existing body to incorporate the passed in point as a convex hull.
AxisAlignedBox Ogre::ConvexBody::getAABB | ( | void | ) | const |
Returns an AABB representation.
const Vector3& Ogre::ConvexBody::getNormal | ( | size_t | poly | ) |
Returns the normal of a specified polygon.
const Polygon& Ogre::ConvexBody::getPolygon | ( | size_t | poly | ) | const |
Returns a polygon.
size_t Ogre::ConvexBody::getPolygonCount | ( | void | ) | const |
Returns the current number of polygons.
const Vector3& Ogre::ConvexBody::getVertex | ( | size_t | poly, |
size_t | vertex | ||
) | const |
Returns a specific vertex of a polygon.
size_t Ogre::ConvexBody::getVertexCount | ( | size_t | poly | ) | const |
Returns the number of vertices for a polygon.
bool Ogre::ConvexBody::hasClosedHull | ( | void | ) | const |
Checks if the body has a closed hull.
void Ogre::ConvexBody::logInfo | ( | ) | const |
Log details of this body.
void Ogre::ConvexBody::mergePolygons | ( | void | ) |
Merges all neighboring polygons into one single polygon if they are lay in the same plane.
|
inline |
Determines if the current object is not equal to the compared one.
References Ogre::RTShader::operator<<().
bool Ogre::ConvexBody::operator== | ( | const ConvexBody & | rhs | ) | const |
Determines if the current object is equal to the compared one.
void Ogre::ConvexBody::reset | ( | void | ) |
Resets the object.
|
friend |
Prints out the body with all its polygons.