add comment and initialization
This commit is contained in:
@@ -588,15 +588,14 @@ void btMultiBodyDynamicsWorld::solveExternalForces(btContactSolverInfo& solverIn
|
|||||||
{
|
{
|
||||||
if (!bod->isUsingRK4Integration())
|
if (!bod->isUsingRK4Integration())
|
||||||
{
|
{
|
||||||
|
// avoid damping in external forces (e.g. gravity)
|
||||||
const btScalar linearDamp = bod->getLinearDamping();
|
const btScalar linearDamp = bod->getLinearDamping();
|
||||||
// const btScalar angularDamp = bod->getAngularDamping();
|
|
||||||
bod->setLinearDamping(0);
|
bod->setLinearDamping(0);
|
||||||
bod->computeAccelerationsArticulatedBodyAlgorithmMultiDof(solverInfo.m_timeStep,
|
bod->computeAccelerationsArticulatedBodyAlgorithmMultiDof(solverInfo.m_timeStep,
|
||||||
m_scratch_r, m_scratch_v, m_scratch_m,isConstraintPass,
|
m_scratch_r, m_scratch_v, m_scratch_m,isConstraintPass,
|
||||||
getSolverInfo().m_jointFeedbackInWorldSpace,
|
getSolverInfo().m_jointFeedbackInWorldSpace,
|
||||||
getSolverInfo().m_jointFeedbackInJointFrame);
|
getSolverInfo().m_jointFeedbackInJointFrame);
|
||||||
bod->setLinearDamping(linearDamp);
|
bod->setLinearDamping(linearDamp);
|
||||||
// bod->setAngularDamping(angularDamp);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ struct btMultibodyLink
|
|||||||
m_parent(-1),
|
m_parent(-1),
|
||||||
m_zeroRotParentToThis(0, 0, 0, 1),
|
m_zeroRotParentToThis(0, 0, 0, 1),
|
||||||
m_cachedRotParentToThis(0, 0, 0, 1),
|
m_cachedRotParentToThis(0, 0, 0, 1),
|
||||||
|
m_cachedRotParentToThis_interpolate(0, 0, 0, 1),
|
||||||
m_collider(0),
|
m_collider(0),
|
||||||
m_flags(0),
|
m_flags(0),
|
||||||
m_dofCount(0),
|
m_dofCount(0),
|
||||||
@@ -179,6 +180,7 @@ struct btMultibodyLink
|
|||||||
m_dVector.setValue(0, 0, 0);
|
m_dVector.setValue(0, 0, 0);
|
||||||
m_eVector.setValue(0, 0, 0);
|
m_eVector.setValue(0, 0, 0);
|
||||||
m_cachedRVector.setValue(0, 0, 0);
|
m_cachedRVector.setValue(0, 0, 0);
|
||||||
|
m_cachedRVector_interpolate.setValue(0, 0, 0);
|
||||||
m_appliedForce.setValue(0, 0, 0);
|
m_appliedForce.setValue(0, 0, 0);
|
||||||
m_appliedTorque.setValue(0, 0, 0);
|
m_appliedTorque.setValue(0, 0, 0);
|
||||||
m_appliedConstraintForce.setValue(0, 0, 0);
|
m_appliedConstraintForce.setValue(0, 0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user