mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:23:55 +02:00
Make RotationConstraintTests pass
A previous bug fix made ElbowConstraint::apply() always return true. Because it as always modifying the rotation via swingTwistDecomposition(). The tests now no longer check for a false value.
This commit is contained in:
parent
c03b9833fd
commit
ddce4750ee
1 changed files with 0 additions and 5 deletions
|
@ -47,7 +47,6 @@ void RotationConstraintTests::testElbowConstraint() {
|
||||||
glm::quat inputRotation = referenceRotation;
|
glm::quat inputRotation = referenceRotation;
|
||||||
glm::quat outputRotation = inputRotation;
|
glm::quat outputRotation = inputRotation;
|
||||||
bool updated = elbow.apply(outputRotation);
|
bool updated = elbow.apply(outputRotation);
|
||||||
QVERIFY(updated == false);
|
|
||||||
glm::quat expectedRotation = referenceRotation;
|
glm::quat expectedRotation = referenceRotation;
|
||||||
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +61,6 @@ void RotationConstraintTests::testElbowConstraint() {
|
||||||
glm::quat inputRotation = glm::angleAxis(angle, hingeAxis) * referenceRotation;
|
glm::quat inputRotation = glm::angleAxis(angle, hingeAxis) * referenceRotation;
|
||||||
glm::quat outputRotation = inputRotation;
|
glm::quat outputRotation = inputRotation;
|
||||||
bool updated = elbow.apply(outputRotation);
|
bool updated = elbow.apply(outputRotation);
|
||||||
QVERIFY(updated == false);
|
|
||||||
QCOMPARE_WITH_ABS_ERROR(inputRotation, outputRotation, EPSILON);
|
QCOMPARE_WITH_ABS_ERROR(inputRotation, outputRotation, EPSILON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +70,6 @@ void RotationConstraintTests::testElbowConstraint() {
|
||||||
glm::quat inputRotation = glm::angleAxis(angle, hingeAxis) * referenceRotation;
|
glm::quat inputRotation = glm::angleAxis(angle, hingeAxis) * referenceRotation;
|
||||||
glm::quat outputRotation = inputRotation;
|
glm::quat outputRotation = inputRotation;
|
||||||
bool updated = elbow.apply(outputRotation);
|
bool updated = elbow.apply(outputRotation);
|
||||||
QVERIFY(updated == true);
|
|
||||||
glm::quat expectedRotation = glm::angleAxis(minAngle, hingeAxis) * referenceRotation;
|
glm::quat expectedRotation = glm::angleAxis(minAngle, hingeAxis) * referenceRotation;
|
||||||
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +79,6 @@ void RotationConstraintTests::testElbowConstraint() {
|
||||||
glm::quat inputRotation = glm::angleAxis(angle, hingeAxis) * referenceRotation;
|
glm::quat inputRotation = glm::angleAxis(angle, hingeAxis) * referenceRotation;
|
||||||
glm::quat outputRotation = inputRotation;
|
glm::quat outputRotation = inputRotation;
|
||||||
bool updated = elbow.apply(outputRotation);
|
bool updated = elbow.apply(outputRotation);
|
||||||
QVERIFY(updated == true);
|
|
||||||
glm::quat expectedRotation = glm::angleAxis(maxAngle, hingeAxis) * referenceRotation;
|
glm::quat expectedRotation = glm::angleAxis(maxAngle, hingeAxis) * referenceRotation;
|
||||||
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
||||||
}
|
}
|
||||||
|
@ -94,7 +90,6 @@ void RotationConstraintTests::testElbowConstraint() {
|
||||||
glm::quat inputRotation = glm::angleAxis(someAngle, twistVector) * referenceRotation;
|
glm::quat inputRotation = glm::angleAxis(someAngle, twistVector) * referenceRotation;
|
||||||
glm::quat outputRotation = inputRotation;
|
glm::quat outputRotation = inputRotation;
|
||||||
bool updated = elbow.apply(outputRotation);
|
bool updated = elbow.apply(outputRotation);
|
||||||
QVERIFY(updated == true);
|
|
||||||
glm::quat expectedRotation = referenceRotation;
|
glm::quat expectedRotation = referenceRotation;
|
||||||
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
QCOMPARE_WITH_ABS_ERROR(expectedRotation, outputRotation, EPSILON);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue