Logo Search packages:      
Sourcecode: blender version File versions  Download package

btTriangleMesh Class Reference

#include <btTriangleMesh.h>

List of all members.

Detailed Description

The btTriangleMesh class is a convenience class derived from btTriangleIndexVertexArray, that provides storage for a concave triangle mesh. It can be used as data for the btBvhTriangleMeshShape. It allows either 32bit or 16bit indices, and 4 (x-y-z-w) or 3 (x-y-z) component vertices. If you want to share triangle/index data between graphics mesh and collision mesh (btBvhTriangleMeshShape), you can directly use btTriangleIndexVertexArray or derive your own class from btStridingMeshInterface. Performance of btTriangleMesh and btTriangleIndexVertexArray used in a btBvhTriangleMeshShape is the same.

Definition at line 28 of file btTriangleMesh.h.

Public Member Functions

void addIndex (int index)
void addTriangle (const btVector3 &vertex0, const btVector3 &vertex1, const btVector3 &vertex2, bool removeDuplicateVertices=false)
 btTriangleMesh (bool use32bitIndices=true, bool use4componentVertices=true)
int findOrAddVertex (const btVector3 &vertex, bool removeDuplicateVertices)
int getNumTriangles () const
bool getUse32bitIndices () const
bool getUse4componentVertices () const
virtual void preallocateIndices (int numindices)
virtual void preallocateVertices (int numverts)

Public Attributes

btScalar m_weldingThreshold

Private Attributes

btAlignedObjectArray< unsigned
short int > 
btAlignedObjectArray< unsigned
int > 
btAlignedObjectArray< float > m_3componentVertices
btAlignedObjectArray< btVector3 > m_4componentVertices
bool m_use32bitIndices
bool m_use4componentVertices

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index