Page 1 of 1

How can I get the the time used for collision detection?

Posted: Fri Mar 27, 2015 5:55 pm
by apapaxionga
How can I get the the time used for collision detection? I notice in the stepSimulation() function, there is a "startprofiling()". How can I retrieve the time used for collision detection?

Re: How can I get the the time used for collision detection?

Posted: Sat Mar 28, 2015 1:07 pm
by RazzorFlame
If you want to get how much time stepSimulation took you can just use WinAPI functions:
http://stackoverflow.com/questions/1739 ... ncecounter

Re: How can I get the the time used for collision detection?

Posted: Sat Mar 28, 2015 5:35 pm
by drleviathan
After looking at the code it appears that they way to get the profiling information is to call CProfileManager::dumpAll() and it will print to stdout the times spent in the various "scopeName" instances of the BT_PROFILE("scopeName") macros that are sprinkled about in the btDiscreteDynamicsWorld and btCollisionWorld implementations.