Fixed over 500 compile warnings. Mostly:
* Unused variables. * Missing newlines at ends of #included files. * signed int loop variables where the termination condition is an unsigned 'get number of' function. * 'NULL' used inappropriately for an integer or character constant (NULL is a pointer) * abstract base classes with no virtual destructor. * Floating point constants used to initialise integer variables.
This commit is contained in:
@@ -327,13 +327,13 @@ static void DrawAabb(IDebugDraw* debugDrawer,const SimdVector3& from,const SimdV
|
||||
|
||||
|
||||
CcdPhysicsEnvironment::CcdPhysicsEnvironment(Dispatcher* dispatcher,OverlappingPairCache* pairCache)
|
||||
:m_scalingPropagated(false),
|
||||
m_numIterations(10),
|
||||
: m_numIterations(10),
|
||||
m_numTimeSubSteps(1),
|
||||
m_ccdMode(0),
|
||||
m_solverType(-1),
|
||||
m_profileTimings(0),
|
||||
m_enableSatCollisionDetection(false)
|
||||
m_enableSatCollisionDetection(false),
|
||||
m_scalingPropagated(false)
|
||||
{
|
||||
|
||||
for (int i=0;i<PHY_NUM_RESPONSE;i++)
|
||||
@@ -383,9 +383,6 @@ void CcdPhysicsEnvironment::addCcdPhysicsController(CcdPhysicsController* ctrl)
|
||||
|
||||
assert(body->m_broadphaseHandle);
|
||||
|
||||
BroadphaseInterface* scene = GetBroadphase();
|
||||
|
||||
|
||||
CollisionShape* shapeinterface = ctrl->GetCollisionShape();
|
||||
|
||||
assert(shapeinterface);
|
||||
@@ -695,10 +692,6 @@ bool CcdPhysicsEnvironment::proceedDeltaTimeOneStep(float timeStep)
|
||||
Profiler::endBlock("DispatchAllCollisionPairs");
|
||||
#endif //USE_QUICKPROF
|
||||
|
||||
|
||||
int numRigidBodies = m_controllers.size();
|
||||
|
||||
|
||||
m_islandManager->UpdateActivationState(GetCollisionWorld(),GetCollisionWorld()->GetDispatcher());
|
||||
|
||||
{
|
||||
@@ -1445,10 +1438,6 @@ void CcdPhysicsEnvironment::removeConstraint(int constraintId)
|
||||
PHY_IPhysicsController* CcdPhysicsEnvironment::rayTest(PHY_IPhysicsController* ignoreClient, float fromX,float fromY,float fromZ, float toX,float toY,float toZ,
|
||||
float& hitX,float& hitY,float& hitZ,float& normalX,float& normalY,float& normalZ)
|
||||
{
|
||||
|
||||
|
||||
float minFraction = 1.f;
|
||||
|
||||
SimdVector3 rayFrom(fromX,fromY,fromZ);
|
||||
SimdVector3 rayTo(toX,toY,toZ);
|
||||
|
||||
@@ -1629,9 +1618,6 @@ void CcdPhysicsEnvironment::requestCollisionCallback(PHY_IPhysicsController* ctr
|
||||
|
||||
void CcdPhysicsEnvironment::CallbackTriggers()
|
||||
{
|
||||
|
||||
CcdPhysicsController* ctrl0=0,*ctrl1=0;
|
||||
|
||||
if (m_triggerCallbacks[PHY_OBJECT_RESPONSE] || (m_debugDrawer && (m_debugDrawer->GetDebugMode() & IDebugDraw::DBG_DrawContactPoints)))
|
||||
{
|
||||
//walk over all overlapping pairs, and if one of the involved bodies is registered for trigger callback, perform callback
|
||||
|
||||
@@ -264,3 +264,4 @@ protected:
|
||||
};
|
||||
|
||||
#endif //CCDPHYSICSENVIRONMENT
|
||||
|
||||
|
||||
@@ -286,13 +286,13 @@ void ParallelIslandDispatcher::DispatchAllCollisionPairs(OverlappingPairCache* p
|
||||
{
|
||||
//m_blockedForChanges = true;
|
||||
|
||||
int i;
|
||||
|
||||
int dispatcherId = GetUniqueId();
|
||||
|
||||
assert(0);
|
||||
|
||||
/*
|
||||
int dispatcherId = GetUniqueId();
|
||||
int i;
|
||||
for (i=0;i<numPairs;i++)
|
||||
{
|
||||
|
||||
|
||||
@@ -134,15 +134,15 @@ bool ParallelPhysicsEnvironment::proceedDeltaTimeOneStep(float timeStep)
|
||||
*/
|
||||
|
||||
//store constraint indices for each island
|
||||
for (i=0;i<m_constraints.size();i++)
|
||||
for (unsigned int ui=0;ui<m_constraints.size();ui++)
|
||||
{
|
||||
TypedConstraint& constraint = *m_constraints[i];
|
||||
TypedConstraint& constraint = *m_constraints[ui];
|
||||
if (constraint.GetRigidBodyA().m_islandTag1 > constraint.GetRigidBodyB().m_islandTag1)
|
||||
{
|
||||
simulationIslands[constraint.GetRigidBodyA().m_islandTag1].m_constraintIndices.push_back(i);
|
||||
simulationIslands[constraint.GetRigidBodyA().m_islandTag1].m_constraintIndices.push_back(ui);
|
||||
} else
|
||||
{
|
||||
simulationIslands[constraint.GetRigidBodyB().m_islandTag1].m_constraintIndices.push_back(i);
|
||||
simulationIslands[constraint.GetRigidBodyB().m_islandTag1].m_constraintIndices.push_back(ui);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -203,4 +203,4 @@ bool ParallelPhysicsEnvironment::proceedDeltaTimeOneStep(float timeStep)
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ bool SimulationIsland::Simulate(IDebugDraw* debugDrawer,int numSolverIterations,
|
||||
overlappingPairs.resize(this->m_overlappingPairIndices.size());
|
||||
|
||||
//gather overlapping pair info
|
||||
int i;
|
||||
unsigned int i;
|
||||
for (i=0;i<m_overlappingPairIndices.size();i++)
|
||||
{
|
||||
overlappingPairs[i] = overlappingPairBaseAddress[m_overlappingPairIndices[i]];
|
||||
@@ -119,13 +119,6 @@ bool SimulationIsland::Simulate(IDebugDraw* debugDrawer,int numSolverIterations,
|
||||
#endif //USE_QUICKPROF
|
||||
|
||||
|
||||
|
||||
|
||||
int numRigidBodies = m_controllers.size();
|
||||
|
||||
|
||||
|
||||
|
||||
//contacts
|
||||
#ifdef USE_QUICKPROF
|
||||
Profiler::beginBlock("SolveConstraint");
|
||||
@@ -407,8 +400,8 @@ void SimulationIsland::UpdateAabbs(IDebugDraw* debugDrawer,BroadphaseInterface*
|
||||
|
||||
SimdVector3 color (1,1,0);
|
||||
|
||||
class IDebugDraw* m_debugDrawer = 0;
|
||||
/*
|
||||
class IDebugDraw* m_debugDrawer = 0;
|
||||
if (m_debugDrawer)
|
||||
{
|
||||
//draw aabb
|
||||
@@ -466,4 +459,4 @@ void SimulationIsland::UpdateAabbs(IDebugDraw* debugDrawer,BroadphaseInterface*
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,6 @@ class SimulationIsland
|
||||
void UpdateAabbs(IDebugDraw* debugDrawer,BroadphaseInterface* broadphase,float timeStep);
|
||||
};
|
||||
|
||||
#endif //SIMULATION_ISLAND_H
|
||||
#endif //SIMULATION_ISLAND_H
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user