Bullet Collision Detection & Physics Library
Public Member Functions | Protected Attributes | List of all members
btTriangleIndexVertexMaterialArray Class Reference

Teh btTriangleIndexVertexMaterialArray is built on TriangleIndexVertexArray The addition of a material array allows for the utilization of the partID and triangleIndex that are returned in the ContactAddedCallback. More...

#include <btTriangleIndexVertexMaterialArray.h>

Inheritance diagram for btTriangleIndexVertexMaterialArray:
Inheritance graph
[legend]
Collaboration diagram for btTriangleIndexVertexMaterialArray:
Collaboration graph
[legend]

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btTriangleIndexVertexMaterialArray ()
 
 btTriangleIndexVertexMaterialArray (int numTriangles, int *triangleIndexBase, int triangleIndexStride, int numVertices, btScalar *vertexBase, int vertexStride, int numMaterials, unsigned char *materialBase, int materialStride, int *triangleMaterialsBase, int materialIndexStride)
 This file was created by Alex Silverman. More...
 
virtual ~btTriangleIndexVertexMaterialArray ()
 
void addMaterialProperties (const btMaterialProperties &mat, PHY_ScalarType triangleType=PHY_INTEGER)
 
virtual void getLockedMaterialBase (unsigned char **materialBase, int &numMaterials, PHY_ScalarType &materialType, int &materialStride, unsigned char **triangleMaterialBase, int &numTriangles, int &triangleMaterialStride, PHY_ScalarType &triangleType, int subpart=0)
 
virtual void getLockedReadOnlyMaterialBase (const unsigned char **materialBase, int &numMaterials, PHY_ScalarType &materialType, int &materialStride, const unsigned char **triangleMaterialBase, int &numTriangles, int &triangleMaterialStride, PHY_ScalarType &triangleType, int subpart=0)
 
- Public Member Functions inherited from btTriangleIndexVertexArray
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btTriangleIndexVertexArray ()
 
virtual ~btTriangleIndexVertexArray ()
 
 btTriangleIndexVertexArray (int numTriangles, int *triangleIndexBase, int triangleIndexStride, int numVertices, btScalar *vertexBase, int vertexStride)
 
void addIndexedMesh (const btIndexedMesh &mesh, PHY_ScalarType indexType=PHY_INTEGER)
 
virtual void getLockedVertexIndexBase (unsigned char **vertexbase, int &numverts, PHY_ScalarType &type, int &vertexStride, unsigned char **indexbase, int &indexstride, int &numfaces, PHY_ScalarType &indicestype, int subpart=0)
 get read and write access to a subpart of a triangle mesh this subpart has a continuous array of vertices and indices in this way the mesh can be handled as chunks of memory with striding very similar to OpenGL vertexarray support make a call to unLockVertexBase when the read and write access is finished More...
 
virtual void getLockedReadOnlyVertexIndexBase (const unsigned char **vertexbase, int &numverts, PHY_ScalarType &type, int &vertexStride, const unsigned char **indexbase, int &indexstride, int &numfaces, PHY_ScalarType &indicestype, int subpart=0) const
 
virtual void unLockVertexBase (int subpart)
 unLockVertexBase finishes the access to a subpart of the triangle mesh make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished More...
 
virtual void unLockReadOnlyVertexBase (int subpart) const
 
virtual int getNumSubParts () const
 getNumSubParts returns the number of seperate subparts each subpart has a continuous array of vertices and indices More...
 
IndexedMeshArraygetIndexedMeshArray ()
 
const IndexedMeshArraygetIndexedMeshArray () const
 
virtual void preallocateVertices (int numverts)
 
virtual void preallocateIndices (int numindices)
 
virtual bool hasPremadeAabb () const
 
virtual void setPremadeAabb (const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
virtual void getPremadeAabb (btVector3 *aabbMin, btVector3 *aabbMax) const
 
- Public Member Functions inherited from btStridingMeshInterface
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btStridingMeshInterface ()
 
virtual ~btStridingMeshInterface ()
 
virtual void InternalProcessAllTriangles (btInternalTriangleIndexCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
void calculateAabbBruteForce (btVector3 &aabbMin, btVector3 &aabbMax)
 brute force method to calculate aabb More...
 
const btVector3getScaling () const
 
void setScaling (const btVector3 &scaling)
 
virtual int calculateSerializeBufferSize () const
 
virtual const char * serialize (void *dataBuffer, btSerializer *serializer) const
 fills the dataBuffer and returns the struct name (and 0 on failure) More...
 

Protected Attributes

MaterialArray m_materials
 
- Protected Attributes inherited from btTriangleIndexVertexArray
IndexedMeshArray m_indexedMeshes
 
int m_pad [2]
 
int m_hasAabb
 
btVector3 m_aabbMin
 
btVector3 m_aabbMax
 
- Protected Attributes inherited from btStridingMeshInterface
btVector3 m_scaling
 

Detailed Description

Teh btTriangleIndexVertexMaterialArray is built on TriangleIndexVertexArray The addition of a material array allows for the utilization of the partID and triangleIndex that are returned in the ContactAddedCallback.

As with TriangleIndexVertexArray, no duplicate is made of the material data, so it is the users responsibility to maintain the array during the lifetime of the TriangleIndexVertexMaterialArray.

Definition at line 50 of file btTriangleIndexVertexMaterialArray.h.

Constructor & Destructor Documentation

btTriangleIndexVertexMaterialArray::btTriangleIndexVertexMaterialArray ( )
inline

Definition at line 58 of file btTriangleIndexVertexMaterialArray.h.

btTriangleIndexVertexMaterialArray::btTriangleIndexVertexMaterialArray ( int  numTriangles,
int *  triangleIndexBase,
int  triangleIndexStride,
int  numVertices,
btScalar vertexBase,
int  vertexStride,
int  numMaterials,
unsigned char *  materialBase,
int  materialStride,
int *  triangleMaterialsBase,
int  materialIndexStride 
)

This file was created by Alex Silverman.

Definition at line 20 of file btTriangleIndexVertexMaterialArray.cpp.

virtual btTriangleIndexVertexMaterialArray::~btTriangleIndexVertexMaterialArray ( )
inlinevirtual

Definition at line 67 of file btTriangleIndexVertexMaterialArray.h.

Member Function Documentation

void btTriangleIndexVertexMaterialArray::addMaterialProperties ( const btMaterialProperties mat,
PHY_ScalarType  triangleType = PHY_INTEGER 
)
inline

Definition at line 69 of file btTriangleIndexVertexMaterialArray.h.

btTriangleIndexVertexMaterialArray::BT_DECLARE_ALIGNED_ALLOCATOR ( )
void btTriangleIndexVertexMaterialArray::getLockedMaterialBase ( unsigned char **  materialBase,
int &  numMaterials,
PHY_ScalarType materialType,
int &  materialStride,
unsigned char **  triangleMaterialBase,
int &  numTriangles,
int &  triangleMaterialStride,
PHY_ScalarType triangleType,
int  subpart = 0 
)
virtual

Definition at line 46 of file btTriangleIndexVertexMaterialArray.cpp.

void btTriangleIndexVertexMaterialArray::getLockedReadOnlyMaterialBase ( const unsigned char **  materialBase,
int &  numMaterials,
PHY_ScalarType materialType,
int &  materialStride,
const unsigned char **  triangleMaterialBase,
int &  numTriangles,
int &  triangleMaterialStride,
PHY_ScalarType triangleType,
int  subpart = 0 
)
virtual

Definition at line 68 of file btTriangleIndexVertexMaterialArray.cpp.

Member Data Documentation

MaterialArray btTriangleIndexVertexMaterialArray::m_materials
protected

Definition at line 53 of file btTriangleIndexVertexMaterialArray.h.


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