Newton + Ogre

Share with us how are you using the powerrrr of the force

Moderator: Alain

Postby walaber » Wed Jun 08, 2005 12:49 am

the debugger is a "Singleton" class. you don't need to worry about making a copy for yourself, it's guaranteed that only 1 copy will ever exist.

you need to do this:

to initialize:

OgreNewt::Debugger::getSingleton().init( mSceneMgr );

then in your loop:

OgreNewt::Debugger::getSingleton().showLines( world );


or you can save a reference to the singleton like this:

OgreNewt::Debugger& debug = OgreNewt::Debugger::getSingleton();

then just do:

debug.init( mSceneMgr );
debug.showLines( mWorld );
debug.hideLines();
etc.
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Previous

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 2 guests

cron