21 int numVertices,
btScalar* vertexBase,
int vertexStride,
22 int numMaterials,
unsigned char* materialBase,
int materialStride,
23 int* triangleMaterialsBase,
int materialIndexStride) :
31 #ifdef BT_USE_DOUBLE_PRECISION
47 unsigned char ** triangleMaterialBase,
int& numTriangles,
int& triangleMaterialStride,
PHY_ScalarType& triangleType,
int subpart)
55 #ifdef BT_USE_DOUBLE_PRECISION
69 const unsigned char ** triangleMaterialBase,
int& numTriangles,
int& triangleMaterialStride,
PHY_ScalarType& triangleType,
int subpart)
75 #ifdef BT_USE_DOUBLE_PRECISION
int m_numMaterials
m_materialBase ==========> 2 btScalar values make up one material, friction then restitution ...
int m_numTriangles
m_numTriangles <=========== This exists in the btIndexedMesh object for the same subpart, but since we're padding the structure, it can be reproduced at no real cost m_triangleMaterials =====> 1 integer value makes up one entry eg: m_triangleMaterials[1] = 5; // This will set triangle 2 to use material 5
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)
btTriangleIndexVertexMaterialArray()
const unsigned char * m_triangleMaterialsBase
void addMaterialProperties(const btMaterialProperties &mat, PHY_ScalarType triangleType=PHY_INTEGER)
The btTriangleIndexVertexArray allows to access multiple triangle meshes, by indexing into existing t...
PHY_ScalarType m_materialType
MaterialArray m_materials
PHY_ScalarType m_triangleType
m_triangleType <========== Automatically set in addMaterialProperties
virtual int getNumSubParts() const
getNumSubParts returns the number of seperate subparts each subpart has a continuous array of vertice...
int m_triangleMaterialStride
const unsigned char * m_materialBase
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)
This file was created by Alex Silverman.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
PHY_ScalarType
PHY_ScalarType enumerates possible scalar types.