Added some comments for stepSimulation and fixed bug: uninitialized variable m_shapeDrawer(drawer) in DebugCastResult.h
This commit is contained in:
@@ -44,7 +44,8 @@ struct btDebugCastResult : public btConvexCast::CastResult
|
|||||||
:m_fromTrans(fromTrans),
|
:m_fromTrans(fromTrans),
|
||||||
m_shape(shape),
|
m_shape(shape),
|
||||||
m_linVel(linVel),
|
m_linVel(linVel),
|
||||||
m_angVel(angVel)
|
m_angVel(angVel),
|
||||||
|
m_shapeDrawer(drawer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +79,8 @@ struct btDebugCastResult : public btConvexCast::CastResult
|
|||||||
btTransform hitTrans;
|
btTransform hitTrans;
|
||||||
btTransformUtil::integrateTransform(m_fromTrans,m_linVel,m_angVel,fraction,hitTrans);
|
btTransformUtil::integrateTransform(m_fromTrans,m_linVel,m_angVel,fraction,hitTrans);
|
||||||
hitTrans.getOpenGLMatrix(m);
|
hitTrans.getOpenGLMatrix(m);
|
||||||
m_shapeDrawer->drawOpenGL(m,m_shape,btVector3(1,0,0),btIDebugDraw::DBG_NoDebug,worldBoundsMin,worldBoundsMax);
|
if (m_shapeDrawer)
|
||||||
|
m_shapeDrawer->drawOpenGL(m,m_shape,btVector3(1,0,0),btIDebugDraw::DBG_NoDebug,worldBoundsMin,worldBoundsMax);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ enum btDynamicsWorldType
|
|||||||
BT_CONTINUOUS_DYNAMICS_WORLD=3
|
BT_CONTINUOUS_DYNAMICS_WORLD=3
|
||||||
};
|
};
|
||||||
|
|
||||||
///btDynamicsWorld is the baseclass for several dynamics implementation, basic, discrete, parallel, and continuous
|
///The btDynamicsWorld is the interface class for several dynamics implementation, basic, discrete, parallel, and continuous etc.
|
||||||
class btDynamicsWorld : public btCollisionWorld
|
class btDynamicsWorld : public btCollisionWorld
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -56,9 +56,11 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
///stepSimulation proceeds the simulation over timeStep units
|
///stepSimulation proceeds the simulation over 'timeStep', units in preferably in seconds.
|
||||||
///if maxSubSteps > 0, it will interpolate time steps
|
///By default, Bullet will subdivide the timestep in constant substeps of each 'fixedTimeStep'.
|
||||||
virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))=0;
|
///in order to keep the simulation real-time, the maximum number of substeps can be clamped to 'maxSubSteps'.
|
||||||
|
///You can disable subdividing the timestep/substepping by passing maxSubSteps=0 as second argument to stepSimulation, but in that case you have to keep the timeStep constant.
|
||||||
|
virtual int stepSimulation( btScalar timeStep,int maxSubSteps=10, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))=0;
|
||||||
|
|
||||||
virtual void debugDrawWorld() = 0;
|
virtual void debugDrawWorld() = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user