Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | if (m_use32bitIndices) | ||||
| m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_32bitIndices[0]; | m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_32bitIndices[0]; | ||||
| } else | } else | ||||
| { | { | ||||
| m_16bitIndices.push_back(index); | m_16bitIndices.push_back(index); | ||||
| m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_16bitIndices[0]; | m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_16bitIndices[0]; | ||||
| } | } | ||||
| } | } | ||||
| void btTriangleMesh::addTriangleIndices(int index1, int index2, int index3 ) | |||||
| { | |||||
| m_indexedMeshes[0].m_numTriangles++; | |||||
| addIndex( index1 ); | |||||
| addIndex( index2 ); | |||||
| addIndex( index3 ); | |||||
| } | |||||
| int btTriangleMesh::findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices) | int btTriangleMesh::findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices) | ||||
| { | { | ||||
| //return index of new/existing vertex | //return index of new/existing vertex | ||||
| ///@todo: could use acceleration structure for this | ///@todo: could use acceleration structure for this | ||||
| if (m_use4componentVertices) | if (m_use4componentVertices) | ||||
| { | { | ||||
| if (removeDuplicateVertices) | if (removeDuplicateVertices) | ||||
| ▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines | |||||