diff options
author | erwincoumans <erwincoumans@google.com> | 2019-08-22 07:38:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-22 07:38:23 -0700 |
commit | 9a7b89c95a8ecc1bfa143870bbed4b5b03444a67 (patch) | |
tree | ff2ea5a0deae2149869facc185b76fd055cb3f7a | |
parent | cb654ddc803a56567fdc8f6dcc4eb3e8291b3e98 (diff) | |
download | bullet3-erwincoumans-patch-7.tar.gz |
Update PhysicsServerCommandProcessor.cpperwincoumans-patch-7
also allow to extract collision info (pybullet. getCollisionShapeData ) for concave meshes. Thanks to Brent.
-rw-r--r-- | examples/SharedMemory/PhysicsServerCommandProcessor.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index d9db25737..249c2ae16 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -11524,16 +11524,18 @@ int PhysicsServerCommandProcessor::extractCollisionShapes(const btCollisionShape switch (colShape->getShapeType()) { - case STATIC_PLANE_PROXYTYPE: - { - btStaticPlaneShape* plane = (btStaticPlaneShape*) colShape; - collisionShapeBuffer[0].m_collisionGeometryType = GEOM_PLANE; - collisionShapeBuffer[0].m_dimensions[0] = plane->getPlaneNormal()[0]; - collisionShapeBuffer[0].m_dimensions[1] = plane->getPlaneNormal()[1]; - collisionShapeBuffer[0].m_dimensions[2] = plane->getPlaneNormal()[2]; - numConverted += 1; - break; - } + case STATIC_PLANE_PROXYTYPE: + { + btStaticPlaneShape* plane = (btStaticPlaneShape*) colShape; + collisionShapeBuffer[0].m_collisionGeometryType = GEOM_PLANE; + collisionShapeBuffer[0].m_dimensions[0] = plane->getPlaneNormal()[0]; + collisionShapeBuffer[0].m_dimensions[1] = plane->getPlaneNormal()[1]; + collisionShapeBuffer[0].m_dimensions[2] = plane->getPlaneNormal()[2]; + numConverted += 1; + break; + } + case TRIANGLE_MESH_SHAPE_PROXYTYPE: + case SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE: case CONVEX_HULL_SHAPE_PROXYTYPE: { UrdfCollision* urdfCol = m_data->m_bulletCollisionShape2UrdfCollision.find(colShape); |