minor cleanup

This commit is contained in:
Andrew Meadows 2014-07-31 13:09:10 -07:00
parent 0b9f246661
commit 0f82236f2c

View file

@ -90,11 +90,9 @@ float VerletCapsuleShape::computeEffectiveMass(const glm::vec3& penetration, con
// one endpoint will move the full amount while the other will move less.
_startLagrangeCoef = startCoef / maxCoef;
_endLagrangeCoef = endCoef / maxCoef;
assert(!glm::isnan(_startLagrangeCoef));
assert(!glm::isnan(_endLagrangeCoef));
} else {
// The coefficients are the same --> the collision will move both equally
// as if the object were solid.
// as if the contact were at the center of mass.
_startLagrangeCoef = 1.0f;
_endLagrangeCoef = 1.0f;
}
@ -104,8 +102,8 @@ float VerletCapsuleShape::computeEffectiveMass(const glm::vec3& penetration, con
void VerletCapsuleShape::accumulateDelta(float relativeMassFactor, const glm::vec3& penetration) {
assert(!glm::isnan(relativeMassFactor));
_startPoint->accumulateDelta(relativeMassFactor * _startLagrangeCoef * penetration);
_endPoint->accumulateDelta(relativeMassFactor * _endLagrangeCoef * penetration);
_startPoint->accumulateDelta((relativeMassFactor * _startLagrangeCoef) * penetration);
_endPoint->accumulateDelta((relativeMassFactor * _endLagrangeCoef) * penetration);
}
void VerletCapsuleShape::applyAccumulatedDelta() {