btTriangleMesh Class Reference

#include <btTriangleMesh.h>

List of all members.

Public Member Functions

void addIndex (int index)
 addIndex is an internal method, use addTriangle instead
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)
 findOrAddVertex is an internal method, use addTriangle instead
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 > 
m_16bitIndices
btAlignedObjectArray< unsigned
int > 
m_32bitIndices
btAlignedObjectArray< float > m_3componentVertices
btAlignedObjectArray< btVector3 > m_4componentVertices
bool m_use32bitIndices
bool m_use4componentVertices

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 27 of file btTriangleMesh.h.


Constructor & Destructor Documentation

btTriangleMesh::btTriangleMesh ( bool  use32bitIndices = true,
bool  use4componentVertices = true 
)

Member Function Documentation

void btTriangleMesh::addIndex ( int  index  ) 

addIndex is an internal method, use addTriangle instead

void btTriangleMesh::addTriangle ( const btVector3 &  vertex0,
const btVector3 &  vertex1,
const btVector3 &  vertex2,
bool  removeDuplicateVertices = false 
)

By default addTriangle won't search for duplicate vertices, because the search is very slow for large triangle meshes. In general it is better to directly use btTriangleIndexVertexArray instead.

int btTriangleMesh::findOrAddVertex ( const btVector3 &  vertex,
bool  removeDuplicateVertices 
)

findOrAddVertex is an internal method, use addTriangle instead

int btTriangleMesh::getNumTriangles (  )  const
bool btTriangleMesh::getUse32bitIndices (  )  const [inline]

Definition at line 43 of file btTriangleMesh.h.

bool btTriangleMesh::getUse4componentVertices (  )  const [inline]

Definition at line 48 of file btTriangleMesh.h.

virtual void btTriangleMesh::preallocateIndices ( int  numindices  )  [inline, virtual]

Definition at line 59 of file btTriangleMesh.h.

virtual void btTriangleMesh::preallocateVertices ( int  numverts  )  [inline, virtual]

Definition at line 58 of file btTriangleMesh.h.


Member Data Documentation

Definition at line 33 of file btTriangleMesh.h.

Definition at line 32 of file btTriangleMesh.h.

Definition at line 30 of file btTriangleMesh.h.

Definition at line 29 of file btTriangleMesh.h.

Definition at line 34 of file btTriangleMesh.h.

Definition at line 35 of file btTriangleMesh.h.

Definition at line 39 of file btTriangleMesh.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Fri Jan 11 10:11:09 2013