- removed obsolete/unused method in btTransform.h
- enable pause mode in AllBulletDemos. - allow verbose output of time stepping in CcdPhysicsDemo
This commit is contained in:
@@ -146,14 +146,17 @@ void SimulationLoop()
|
|||||||
demo->setDebugMode(demo->getDebugMode() & (~btIDebugDraw::DBG_NoDeactivation));
|
demo->setDebugMode(demo->getDebugMode() & (~btIDebugDraw::DBG_NoDeactivation));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (demo->getDynamicsWorld()->getWorldType() == BT_DISCRETE_DYNAMICS_WORLD)
|
if (demo->getDynamicsWorld() && demo->getDynamicsWorld()->getWorldType() == BT_DISCRETE_DYNAMICS_WORLD)
|
||||||
{
|
{
|
||||||
btDiscreteDynamicsWorld* discreteWorld = (btDiscreteDynamicsWorld*) demo->getDynamicsWorld();
|
btDiscreteDynamicsWorld* discreteWorld = (btDiscreteDynamicsWorld*) demo->getDynamicsWorld();
|
||||||
discreteWorld->getSolverInfo().m_numIterations = iterationCount;
|
discreteWorld->getSolverInfo().m_numIterations = iterationCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
demo->clientMoveAndDisplay();
|
if (!demo->isIdle())
|
||||||
|
demo->clientMoveAndDisplay();
|
||||||
|
else
|
||||||
|
demo->displayCallback();
|
||||||
|
|
||||||
|
|
||||||
/// DrawString(5, 15, entry->name);
|
/// DrawString(5, 15, entry->name);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ subject to the following restrictions:
|
|||||||
//#define USER_DEFINED_FRICTION_MODEL 1
|
//#define USER_DEFINED_FRICTION_MODEL 1
|
||||||
//#define USE_CUSTOM_NEAR_CALLBACK 1
|
//#define USE_CUSTOM_NEAR_CALLBACK 1
|
||||||
//#define CENTER_OF_MASS_SHIFT 1
|
//#define CENTER_OF_MASS_SHIFT 1
|
||||||
|
//#define VERBOSE_TIMESTEPPING_CONSOLEOUTPUT 1
|
||||||
|
|
||||||
//#define USE_PARALLEL_SOLVER 1 //experimental parallel solver
|
//#define USE_PARALLEL_SOLVER 1 //experimental parallel solver
|
||||||
//#define USE_PARALLEL_DISPATCHER 1
|
//#define USE_PARALLEL_DISPATCHER 1
|
||||||
@@ -284,7 +285,8 @@ void CcdPhysicsDemo::clientMoveAndDisplay()
|
|||||||
|
|
||||||
int numSimSteps = 0;
|
int numSimSteps = 0;
|
||||||
numSimSteps = m_dynamicsWorld->stepSimulation(dt,maxSimSubSteps);
|
numSimSteps = m_dynamicsWorld->stepSimulation(dt,maxSimSubSteps);
|
||||||
/*
|
|
||||||
|
#ifdef VERBOSE_TIMESTEPPING_CONSOLEOUTPUT
|
||||||
if (!numSimSteps)
|
if (!numSimSteps)
|
||||||
printf("Interpolated transforms\n");
|
printf("Interpolated transforms\n");
|
||||||
else
|
else
|
||||||
@@ -298,7 +300,7 @@ void CcdPhysicsDemo::clientMoveAndDisplay()
|
|||||||
printf("Simulated (%i) steps\n",numSimSteps);
|
printf("Simulated (%i) steps\n",numSimSteps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
#endif //VERBOSE_TIMESTEPPING_CONSOLEOUTPUT
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,6 +172,17 @@ public:
|
|||||||
void zoomIn();
|
void zoomIn();
|
||||||
void zoomOut();
|
void zoomOut();
|
||||||
|
|
||||||
|
bool isIdle() const
|
||||||
|
{
|
||||||
|
return m_idle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setIdle(bool idle)
|
||||||
|
{
|
||||||
|
m_idle = idle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //DEMO_APPLICATION_H
|
#endif //DEMO_APPLICATION_H
|
||||||
|
|||||||
@@ -92,13 +92,7 @@ public:
|
|||||||
m_basis.getRotation(q);
|
m_basis.getRotation(q);
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
template <typename Scalar2>
|
|
||||||
void setValue(const Scalar2 *m)
|
|
||||||
{
|
|
||||||
m_basis.setValue(m);
|
|
||||||
m_origin.setValue(&m[12]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void setFromOpenGLMatrix(const btScalar *m)
|
void setFromOpenGLMatrix(const btScalar *m)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user