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

This reverts commit d2d987a5ed.

After discussion, we decided to use userPtr.
This commit is contained in:
Jan Matas
2018-02-12 11:26:39 +00:00
parent d2d987a5ed
commit 817fb40fb5
3 changed files with 3 additions and 16 deletions

View File

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