Added some comments for stepSimulation and fixed bug: uninitialized variable m_shapeDrawer(drawer) in DebugCastResult.h

This commit is contained in:
erwin.coumans
2008-08-28 02:01:23 +00:00
parent dcefff0e0e
commit 5fd1a69f32
2 changed files with 10 additions and 6 deletions

View File

@@ -44,7 +44,8 @@ struct btDebugCastResult : public btConvexCast::CastResult
:m_fromTrans(fromTrans),
m_shape(shape),
m_linVel(linVel),
m_angVel(angVel)
m_angVel(angVel),
m_shapeDrawer(drawer)
{
}
@@ -78,7 +79,8 @@ struct btDebugCastResult : public btConvexCast::CastResult
btTransform hitTrans;
btTransformUtil::integrateTransform(m_fromTrans,m_linVel,m_angVel,fraction,hitTrans);
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);
}
};