mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 21:55:53 +02:00
minor cleanup
This commit is contained in:
parent
0b9f246661
commit
0f82236f2c
1 changed files with 3 additions and 5 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue