Debug Drawing For Shapes

Post Reply
User avatar
nikki
Posts: 22
Joined: Sat Jun 14, 2008 3:38 pm
Location: Doha, Qatar.
Contact:

Debug Drawing For Shapes

Post by nikki »

Hello,

I'm writing my own thin wrapper for Bullet to Ogre. I already have the rigid body (I don't encapsulate Bullet bodies, I just provide a MotionState and talk to Bullet directly) and mesh conversion working, now I'm tackling debug drawing. I've already made a class inheriting from btIDebugDraw and implemented the 'drawLine', 'drawContactPoint', and 'reportErrorWarning' functions. The others are empty (for now). So, I call 'setDebugDrawer' on the world. When I run the test application I made to test physics, I see this, it's working fine (I guess):-

Image

My question is, how do I implement debug drawing for the rigid bodies themselves? Like, 'mBody->setDebugDraw(true)' or something. Can it use the existing debug drawer I've written?

Thanks for the help!
:)
User avatar
nikki
Posts: 22
Joined: Sat Jun 14, 2008 3:38 pm
Location: Doha, Qatar.
Contact:

Re: Debug Drawing For Shapes

Post by nikki »

Ok, fixed it, just had to call 'world->debugDrawWorld();' when needed. :oops:

I must say, the debug draw looks pretty good:-

Image
Post Reply