Debug Draw btCollisionObject

Post Reply
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

Debug Draw btCollisionObject

Post by »

How can I take a btCollisionObject with a btGImpactMeshShape and render its mesh for debug purposes?
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Re: Debug Draw btCollisionObject

Post by Flix »

Code: Select all

btGImpactMeshShape* shape = static_cast<btGImpactMeshShape*>(co->getCollisionShape());
btStridingMeshInterface* mi = shape->>getMeshInterface();
// get vertices and indices from the btStridingMeshInterface (see: btStridingMeshInterface.h)
The same is valid for btBvhTriangleMeshShapes.

P.S. And, as usual, answers to this question could be found by using the Search Button.
Post Reply