applied patch contributed by Tim Johansson: adds support for multiple mesh parts in combination with bvh, add short index support for meshes.

This commit is contained in:
ejcoumans
2007-11-06 06:47:04 +00:00
parent 47afa86482
commit 282cbdcdd9
5 changed files with 39 additions and 14 deletions

View File

@@ -141,12 +141,13 @@ void btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,co
nodeSubPart);
int* gfxbase = (int*)(indexbase+nodeTriangleIndex*indexstride);
btAssert(indicestype==PHY_INTEGER||indicestype==PHY_SHORT);
const btVector3& meshScaling = m_meshInterface->getScaling();
for (int j=2;j>=0;j--)
{
int graphicsindex = gfxbase[j];
int graphicsindex = indicestype==PHY_SHORT?((short*)gfxbase)[j]:gfxbase[j];
#ifdef DEBUG_TRIANGLE_MESH