Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Oct 26, 2011 5:20 am 
Offline

Joined: Tue Jun 28, 2011 4:11 am
Posts: 14
Hello. I have built the debug drawer for btDiscrete Dynamics world like this.

Code:
 collisionConfiguration = new btDefaultCollisionConfiguration();

         ///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
         dispatcher = new btCollisionDispatcher(collisionConfiguration);

         ///btDbvtBroadphase is a good general purpose broadphase. You can also try out btAxis3Sweep.
         overlappingPairCache = new btDbvtBroadphase();

         ///the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
         solver = new btSequentialImpulseConstraintSolver;

         dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,overlappingPairCache,solver,collisionConfiguration);
     
       dynamicsWorld->setGravity(Gravity);
         debugDrawer = new DebugDrawer;
      

        dynamicsWorld->setDebugDrawer(debugDrawer);
        dynamicsWorld->getDebugDrawer()->setDebugMode(btIDebugDraw::DBG_DrawWireframe);

       //dynamicsWorld->setDebugDrawer(&debugDrawer);
       dynamicsWorld->debugDrawWorld();
   


I read this in the manual "Derive your own class and implement the virtual ‘drawLine’ and other methods."
what does that mean? I don't know how to do that.Is there a simple way to do it for bullet normal shapes.

It will no draw anything but does not error so im cose. Can someone help thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group