From 7a4787a79cec2d33471ae86ebbb27f511705e2d8 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 30 Oct 2015 09:21:13 -0700 Subject: [PATCH] Rename stepSimulation to stepSimulationWithSubstepCallback to fix warning --- libraries/physics/src/PhysicsEngine.cpp | 7 ++++--- libraries/physics/src/ThreadSafeDynamicsWorld.cpp | 5 +++-- libraries/physics/src/ThreadSafeDynamicsWorld.h | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libraries/physics/src/PhysicsEngine.cpp b/libraries/physics/src/PhysicsEngine.cpp index 6773cecb14..2abe4317d7 100644 --- a/libraries/physics/src/PhysicsEngine.cpp +++ b/libraries/physics/src/PhysicsEngine.cpp @@ -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; diff --git a/libraries/physics/src/ThreadSafeDynamicsWorld.cpp b/libraries/physics/src/ThreadSafeDynamicsWorld.cpp index 8bf7cdab20..94d6315705 100644 --- a/libraries/physics/src/ThreadSafeDynamicsWorld.cpp +++ b/libraries/physics/src/ThreadSafeDynamicsWorld.cpp @@ -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 diff --git a/libraries/physics/src/ThreadSafeDynamicsWorld.h b/libraries/physics/src/ThreadSafeDynamicsWorld.h index 1f6ce09d0c..26954832cf 100644 --- a/libraries/physics/src/ThreadSafeDynamicsWorld.h +++ b/libraries/physics/src/ThreadSafeDynamicsWorld.h @@ -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