29 #ifndef __ConvexBody_H__
30 #define __ConvexBody_H__
34 #if OGRE_THREAD_SUPPORT
65 #if OGRE_THREAD_SUPPORT
76 void define(
const Frustum& frustum);
85 void clip(
const Frustum& frustum );
98 void clip(
const Plane& pl,
bool keepNegative =
true);
106 void extend(
const Vector3& pt);
114 size_t getPolygonCount(
void )
const;
118 size_t getVertexCount(
size_t poly )
const;
122 const Polygon& getPolygon(
size_t poly )
const;
126 const Vector3& getVertex(
size_t poly,
size_t vertex )
const;
130 const Vector3& getNormal(
size_t poly );
138 bool hasClosedHull(
void )
const;
143 void mergePolygons(
void );
152 {
return !( *
this == rhs ); }
159 void logInfo()
const;
162 static void _initialisePool();
164 static void _destroyPool();
170 static Polygon* allocatePolygon();
172 static void freePolygon(
Polygon* poly);
178 void insertPolygon(
Polygon* pdata,
size_t poly);
184 void insertPolygon(
Polygon* pdata);
191 void insertVertex(
size_t poly,
const Vector3& vdata,
size_t vertex);
197 void insertVertex(
size_t poly,
const Vector3& vdata);
200 void deletePolygon(
size_t poly);
206 Polygon* unlinkPolygon(
size_t poly);
215 void deleteVertex(
size_t poly,
size_t vertex);
221 void setPolygon(
Polygon* pdata,
size_t poly );
228 void setVertex(
size_t poly,
const Vector3& vdata,
size_t vertex );
244 void allocateSpace(
size_t numPolygons,
size_t numVertices);
254 bool findAndEraseEdgePair(
const Vector3& vec,
Defines a plane in 3D space.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Holds a solid representation of a convex body.
A 3D box aligned with the x/y/z axes.
static PolygonList msFreePolygons
The class represents a polygon in 3D space.
multimap< Vector3, Vector3 >::type EdgeMap
Standard 3-dimensional vector.
std::ostream & operator<<(std::ostream &o, const TRect< T > &r)
#define OGRE_STATIC_MUTEX(name)
vector< Polygon * >::type PolygonList
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)