Rename stepSimulation to stepSimulationWithSubstepCallback to fix warning

This commit is contained in:
Ryan Huffman 2015-10-30 09:21:13 -07:00
parent b464b2f1f7
commit 7a4787a79c
3 changed files with 10 additions and 7 deletions

View file

@ -228,7 +228,7 @@ void PhysicsEngine::removeContacts(ObjectMotionState* motionState) {
void PhysicsEngine::stepSimulation() {
CProfileManager::Reset();
BT_PROFILE("stepSimulation");
BT_PROFILE("stepSimulationWithSubstepCallback");
// NOTE: the grand order of operations is:
// (1) pull incoming changes
// (2) step simulation
@ -241,7 +241,7 @@ void PhysicsEngine::stepSimulation() {
float timeStep = btMin(dt, MAX_TIMESTEP);
if (_myAvatarController) {
// ADEBUG TODO: move this stuff outside and in front of stepSimulation, because
// ADEBUG TODO: move this stuff outside and in front of stepSimulationWithSubstepCallback, because
// the updateShapeIfNecessary() call needs info from MyAvatar and should
// be done on the main thread during the pre-simulation stuff
if (_myAvatarController->needsRemoval()) {
@ -263,7 +263,8 @@ void PhysicsEngine::stepSimulation() {
updateContactMap();
};
int numSubsteps = _dynamicsWorld->stepSimulation(timeStep, PHYSICS_ENGINE_MAX_NUM_SUBSTEPS, PHYSICS_ENGINE_FIXED_SUBSTEP, onSubStep);
int numSubsteps = _dynamicsWorld->stepSimulationWithSubstepCallback(timeStep, PHYSICS_ENGINE_MAX_NUM_SUBSTEPS,
PHYSICS_ENGINE_FIXED_SUBSTEP, onSubStep);
if (numSubsteps > 0) {
BT_PROFILE("postSimulation");
_numSubsteps += (uint32_t)numSubsteps;

View file

@ -27,8 +27,9 @@ ThreadSafeDynamicsWorld::ThreadSafeDynamicsWorld(
: btDiscreteDynamicsWorld(dispatcher, pairCache, constraintSolver, collisionConfiguration) {
}
int ThreadSafeDynamicsWorld::stepSimulation( btScalar timeStep, int maxSubSteps, btScalar fixedTimeStep, SubStepCallback onSubStep) {
BT_PROFILE("stepSimulation");
int ThreadSafeDynamicsWorld::stepSimulationWithSubstepCallback(btScalar timeStep, int maxSubSteps,
btScalar fixedTimeStep, SubStepCallback onSubStep) {
BT_PROFILE("stepSimulationWithSubstepCallback");
int subSteps = 0;
if (maxSubSteps) {
//fixed timestep with interpolation

View file

@ -37,8 +37,9 @@ public:
btConstraintSolver* constraintSolver,
btCollisionConfiguration* collisionConfiguration);
// virtual overrides from btDiscreteDynamicsWorld
int stepSimulation( btScalar timeStep, int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.), SubStepCallback onSubStep = []() { });
int stepSimulationWithSubstepCallback(btScalar timeStep, int maxSubSteps = 1,
btScalar fixedTimeStep = btScalar(1.)/btScalar(60.),
SubStepCallback onSubStep = []() { });
void synchronizeMotionStates();
// btDiscreteDynamicsWorld::m_localTime is the portion of real-time that has not yet been simulated