Logo Search packages:      
Sourcecode: blender version File versions  Download package

void btSimpleDynamicsWorld::synchronizeMotionStates (  )  [virtual]

Todo:
: iterate over awake simulation islands!

Implements btDynamicsWorld.

Definition at line 211 of file btSimpleDynamicsWorld.cpp.

References btRigidBody::getMotionState(), btMotionState::setWorldTransform(), btAlignedObjectArray< T >::size(), and btRigidBody::upcast().

Referenced by stepSimulation().

{
      ///@todo: iterate over awake simulation islands!
      for ( int i=0;i<m_collisionObjects.size();i++)
      {
            btCollisionObject* colObj = m_collisionObjects[i];
            btRigidBody* body = btRigidBody::upcast(colObj);
            if (body && body->getMotionState())
            {
                  if (body->getActivationState() != ISLAND_SLEEPING)
                  {
                        body->getMotionState()->setWorldTransform(body->getWorldTransform());
                  }
            }
      }

}


Generated by  Doxygen 1.6.0   Back to index