#include <OgreConvexBody.h>
Public Types | |
typedef std::vector< Polygon * > | PolygonList |
Public Member Functions | |
ConvexBody () | |
~ConvexBody () | |
ConvexBody (const ConvexBody &cpy) | |
void | define (const Frustum &frustum) |
Build a new polygon representation from a frustum. | |
void | define (const AxisAlignedBox &aab) |
Build a new polygon representation from an AAB. | |
void | clip (const Frustum &frustum) |
Clips the body with a frustum. | |
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 Plane &pl, bool keepNegative=true) |
Clips the object by the positive half space of a plane. | |
void | extend (const Vector3 &pt) |
Extends the existing body to incorporate the passed in point as a convex hull. | |
void | reset (void) |
Resets the object. | |
size_t | getPolygonCount (void) const |
Returns the current number of polygons. | |
size_t | getVertexCount (size_t poly) const |
Returns the number of vertices for a polygon. | |
const Polygon & | getPolygon (size_t poly) const |
Returns a polygon. | |
const Vector3 & | getVertex (size_t poly, size_t vertex) const |
Returns a specific vertex of a polygon. | |
const Vector3 & | getNormal (size_t poly) |
Returns the normal of a specified polygon. | |
AxisAlignedBox | getAABB (void) const |
Returns an AABB representation. | |
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 equal to the compared one. | |
bool | operator!= (const ConvexBody &rhs) const |
Determines if the current object is not equal to the compared one. | |
void | logInfo () const |
Log details of this body. | |
Static Public Member Functions | |
static void | _initialisePool () |
Initialise the internal polygon pool used to minimise allocations. | |
static void | _destroyPool () |
Tear down the internal polygon pool used to minimise allocations. | |
Protected Member Functions | |
void | insertPolygon (Polygon *pdata, size_t poly) |
Inserts a polygon at a partcular point in the body. | |
void | insertPolygon (Polygon *pdata) |
Inserts a polygon at the end. | |
void | insertVertex (size_t poly, const Vector3 &vdata, size_t vertex) |
Inserts a vertex for a polygon at a particular point. | |
void | insertVertex (size_t poly, const Vector3 &vdata) |
Inserts a vertex for a polygon at the end. | |
void | deletePolygon (size_t poly) |
Deletes a specific polygon. | |
Polygon * | unlinkPolygon (size_t poly) |
Removes a specific polygon from the body without deleting it. | |
void | moveDataFromBody (ConvexBody &body) |
Moves all polygons from the parameter body to this instance. | |
void | deleteVertex (size_t poly, size_t vertex) |
Deletes a specific vertex of a specific polygon. | |
void | setPolygon (Polygon *pdata, size_t poly) |
Replace a polygon at a particular index. | |
void | setVertex (size_t poly, const Vector3 &vdata, size_t vertex) |
Replace a specific vertex of a polygon. | |
Polygon::EdgeMap | getSingleEdges () const |
Returns the single edges in an EdgeMap (= edges where one side is a vertex and the other is empty space (a hole in the body)). | |
void | storeEdgesOfPolygon (size_t poly, Polygon::EdgeMap *edgeMap) const |
Stores the edges of a specific polygon in a passed in structure. | |
void | allocateSpace (size_t numPolygons, size_t numVertices) |
Allocates space for an specified amount of polygons with each of them having a specified number of vertices. | |
bool | findAndEraseEdgePair (const Vector3 &vec, Polygon::EdgeMap &intersectionEdges, Vector3 &vNext) const |
Searches for a pair (an edge) in the intersectionList with an entry that equals vec, and removes it from the passed in list. | |
Static Protected Member Functions | |
static Polygon * | allocatePolygon () |
Get a new polygon from the pool. | |
static void | freePolygon (Polygon *poly) |
Release a polygon back tot he pool. | |
Protected Attributes | |
PolygonList | mPolygons |
Static Protected Attributes | |
static PolygonList | msFreePolygons |
Friends | |
_OgreExport friend std::ostream & | operator<< (std::ostream &strm, const ConvexBody &body) |
Prints out the body with all its polygons. |
Definition at line 46 of file OgreConvexBody.h.
|
Definition at line 49 of file OgreConvexBody.h. |
|
|
|
|
|
|
|
Tear down the internal polygon pool used to minimise allocations.
|
|
Initialise the internal polygon pool used to minimise allocations.
|
|
Get a new polygon from the pool.
|
|
Allocates space for an specified amount of polygons with each of them having a specified number of vertices.
|
|
Clips the object by the positive half space of a plane.
|
|
Clips the body with another body.
|
|
Clips the body with an AAB. The resulting holes are filled with new polygons. |
|
Clips the body with a frustum. The resulting holes are filled with new polygons. |
|
Build a new polygon representation from an AAB.
|
|
Build a new polygon representation from a frustum.
|
|
Deletes a specific polygon.
|
|
Deletes a specific vertex of a specific polygon.
|
|
Extends the existing body to incorporate the passed in point as a convex hull.
|
|
Searches for a pair (an edge) in the intersectionList with an entry that equals vec, and removes it from the passed in list.
|
|
Release a polygon back tot he pool.
|
|
Returns an AABB representation.
|
|
Returns the normal of a specified polygon.
|
|
Returns a polygon.
|
|
Returns the current number of polygons.
|
|
Returns the single edges in an EdgeMap (= edges where one side is a vertex and the other is empty space (a hole in the body)).
|
|
Returns a specific vertex of a polygon.
|
|
Returns the number of vertices for a polygon.
|
|
Checks if the body has a closed hull.
|
|
Inserts a polygon at the end.
|
|
Inserts a polygon at a partcular point in the body.
|
|
Inserts a vertex for a polygon at the end.
|
|
Inserts a vertex for a polygon at a particular point.
|
|
Log details of this body.
|
|
Merges all neighboring polygons into one single polygon if they are lay in the same plane.
|
|
Moves all polygons from the parameter body to this instance.
|
|
Determines if the current object is not equal to the compared one.
Definition at line 142 of file OgreConvexBody.h. |
|
Determines if the current object is equal to the compared one.
|
|
Resets the object.
|
|
Replace a polygon at a particular index.
|
|
Replace a specific vertex of a polygon.
|
|
Stores the edges of a specific polygon in a passed in structure.
|
|
Removes a specific polygon from the body without deleting it.
|
|
Prints out the body with all its polygons.
|
|
Definition at line 52 of file OgreConvexBody.h. |
|
Definition at line 55 of file OgreConvexBody.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Dec 27 15:19:40 2007