Create a new pointer in btCollisionShape instead of just using userPtr.

This commit is contained in:
Jan Matas committed 2018-02-08 13:49:36 +00:00
1 parent 82214eb99f
commit d2d987a5ed
3 files changed
+16 -3

No files matched your search

+2 -2
View File
@@ -1291,8 +1291,8 @@ void OpenGLGuiHelper::computeSoftBodyVertices(btCollisionShape* collisionShape,
btAlignedObjectArray<GLInstanceVertex>& gfxVertices,
btAlignedObjectArray<int>& indices)
{
b3Assert(collisionShape->getUserPointer());
btSoftBody* psb = (btSoftBody*)collisionShape->getUserPointer();
b3Assert(collisionShape->getBodyPointer());
btSoftBody* psb = (btSoftBody*)collisionShape->getBodyPointer();
gfxVertices.resize(psb->m_faces.size() * 3);
int i, j, k;
for (i = 0; i < psb->m_faces.size(); i++) // Foreach face