Changeset 2908 for code/branches/questsystem5/src/bullet/BulletCollision/CollisionShapes/btTriangleMesh.cpp
- Timestamp:
- Apr 8, 2009, 12:58:47 AM (16 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/bullet/BulletCollision/CollisionShapes/btTriangleMesh.cpp
r2907 r2908 36 36 { 37 37 m_indexedMeshes[0].m_numTriangles = m_32bitIndices.size()/3; 38 m_indexedMeshes[0].m_triangleIndexBase = 0;38 m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_32bitIndices[0]; 39 39 m_indexedMeshes[0].m_indexType = PHY_INTEGER; 40 40 m_indexedMeshes[0].m_triangleIndexStride = 3*sizeof(int); … … 42 42 { 43 43 m_indexedMeshes[0].m_numTriangles = m_16bitIndices.size()/3; 44 m_indexedMeshes[0].m_triangleIndexBase = 0;44 m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_16bitIndices[0]; 45 45 m_indexedMeshes[0].m_indexType = PHY_SHORT; 46 46 m_indexedMeshes[0].m_triangleIndexStride = 3*sizeof(short int); … … 50 50 { 51 51 m_indexedMeshes[0].m_numVertices = m_4componentVertices.size(); 52 m_indexedMeshes[0].m_vertexBase = 0;52 m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_4componentVertices[0]; 53 53 m_indexedMeshes[0].m_vertexStride = sizeof(btVector3); 54 54 } else 55 55 { 56 56 m_indexedMeshes[0].m_numVertices = m_3componentVertices.size()/3; 57 m_indexedMeshes[0].m_vertexBase = 0;57 m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_3componentVertices[0]; 58 58 m_indexedMeshes[0].m_vertexStride = 3*sizeof(btScalar); 59 59 } … … 112 112 } 113 113 } 114 m_3componentVertices.push_back( (float)vertex.getX());115 m_3componentVertices.push_back( (float)vertex.getY());116 m_3componentVertices.push_back( (float)vertex.getZ());114 m_3componentVertices.push_back(vertex.getX()); 115 m_3componentVertices.push_back(vertex.getY()); 116 m_3componentVertices.push_back(vertex.getZ()); 117 117 m_indexedMeshes[0].m_numVertices++; 118 118 m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_3componentVertices[0];
Note: See TracChangeset
for help on using the changeset viewer.