![]() |
Blender V2.61 - r43446
|
btShapeHull implemented by John McCutchan. More...
#include <btShapeHull.h>
Public Member Functions | |
| btShapeHull (const btConvexShape *shape) | |
| ~btShapeHull () | |
| bool | buildHull (btScalar margin) |
| int | numTriangles () const |
| int | numVertices () const |
| int | numIndices () const |
| const btVector3 * | getVertexPointer () const |
| const unsigned int * | getIndexPointer () const |
Static Protected Member Functions | |
| static btVector3 * | getUnitSpherePoints () |
Protected Attributes | |
| btAlignedObjectArray< btVector3 > | m_vertices |
| btAlignedObjectArray< unsigned int > | m_indices |
| unsigned int | m_numIndices |
| const btConvexShape * | m_shape |
btShapeHull implemented by John McCutchan.
The btShapeHull class takes a btConvexShape, builds a simplified convex hull using btConvexHull and provides triangle indices and vertices. It can be useful for to simplify a complex convex object and for visualization of a non-polyhedral convex object. It approximates the convex hull using the supporting vertex of 42 directions.
Definition at line 28 of file btShapeHull.h.
| btShapeHull::btShapeHull | ( | const btConvexShape * | shape | ) |
Definition at line 24 of file btShapeHull.cpp.
References btAlignedObjectArray< T >::clear(), m_indices, m_numIndices, m_shape, and m_vertices.
| btShapeHull::~btShapeHull | ( | ) |
Definition at line 32 of file btShapeHull.cpp.
References btAlignedObjectArray< T >::clear(), m_indices, and m_vertices.
| bool btShapeHull::buildHull | ( | btScalar | margin | ) |
Definition at line 39 of file btShapeHull.cpp.
References HullLibrary::CreateConvexHull(), getUnitSpherePoints(), i, m_indices, HullResult::m_Indices, m_numIndices, HullResult::m_OutputVertices, m_shape, m_vertices, MAX_PREFERRED_PENETRATION_DIRECTIONS, HullDesc::mFlags, HullResult::mNumIndices, HullResult::mNumOutputVertices, HullDesc::mVcount, HullDesc::mVertexStride, HullDesc::mVertices, norm(), NUM_UNITSPHERE_POINTS, QE_FAIL, QF_TRIANGLES, HullLibrary::ReleaseResult(), and btAlignedObjectArray< T >::resize().
| const unsigned int* btShapeHull::getIndexPointer | ( | ) | const [inline] |
Definition at line 53 of file btShapeHull.h.
References m_indices.
| btVector3 * btShapeHull::getUnitSpherePoints | ( | ) | [static, protected] |
Definition at line 121 of file btShapeHull.cpp.
References MAX_PREFERRED_PENETRATION_DIRECTIONS, and NUM_UNITSPHERE_POINTS.
Referenced by buildHull().
| const btVector3* btShapeHull::getVertexPointer | ( | void | ) | const [inline] |
Definition at line 49 of file btShapeHull.h.
References m_vertices.
| int btShapeHull::numIndices | ( | ) | const |
Definition at line 115 of file btShapeHull.cpp.
References m_numIndices.
| int btShapeHull::numTriangles | ( | ) | const |
Definition at line 103 of file btShapeHull.cpp.
References m_numIndices.
| int btShapeHull::numVertices | ( | ) | const |
Definition at line 109 of file btShapeHull.cpp.
References m_vertices, and btAlignedObjectArray< T >::size().
btAlignedObjectArray<unsigned int> btShapeHull::m_indices [protected] |
Definition at line 33 of file btShapeHull.h.
Referenced by btShapeHull(), buildHull(), getIndexPointer(), and ~btShapeHull().
unsigned int btShapeHull::m_numIndices [protected] |
Definition at line 34 of file btShapeHull.h.
Referenced by btShapeHull(), buildHull(), numIndices(), and numTriangles().
const btConvexShape* btShapeHull::m_shape [protected] |
Definition at line 35 of file btShapeHull.h.
Referenced by btShapeHull(), and buildHull().
btAlignedObjectArray<btVector3> btShapeHull::m_vertices [protected] |
Definition at line 32 of file btShapeHull.h.
Referenced by btShapeHull(), buildHull(), getVertexPointer(), numVertices(), and ~btShapeHull().