+ add option to set pre-tick callback, called at the beginning of each internal simulation step

+ use real-time for soft body demo (using this pre-tick callback)
+ optimize the generation of bending constraints for the special case where the distance is 2
This commit is contained in:
erwin.coumans
2009-08-14 21:36:51 +00:00
parent e89fe1cbfa
commit 34699f6de6
5 changed files with 135 additions and 40 deletions

View File

@@ -362,6 +362,10 @@ void btDiscreteDynamicsWorld::internalSingleStepSimulation(btScalar timeStep)
BT_PROFILE("internalSingleStepSimulation");
if(0 != m_internalPreTickCallback) {
(*m_internalPreTickCallback)(this, timeStep);
}
///apply gravity, predict motion
predictUnconstraintMotion(timeStep);