Removed debug output in tests.
parent
67cc892f14
commit
159400b722
|
@ -321,19 +321,8 @@ TEST_CASE("CalcConstraintImpulse", "[Collision]") {
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("CalculateImpulse") {
|
SECTION("CalculateImpulse") {
|
||||||
for (int i = 0; i < 1; i++) {
|
|
||||||
cout << "Iter " << i << endl;
|
|
||||||
CalcConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo, 0);
|
CalcConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo, 0);
|
||||||
// REQUIRE((cinfo.accumImpulse - Vector3d(0., 0., 0.)).norm() < 1.0e-12);
|
|
||||||
// REQUIRE((cinfo.accumImpulse - Vector3d(0., -sphere_mass * sphere_a_body.qdot[1], 0.)).norm() < 1.0e-12);
|
|
||||||
|
|
||||||
cout << "pre impulse: " << sphere_a_body.qdot.transpose() << endl;
|
|
||||||
cout << "pre impulse2: " << sphere_b_body.qdot.transpose() << endl;
|
|
||||||
cout << "impulse: " << cinfo.deltaImpulse << endl;
|
|
||||||
ApplyConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo);
|
ApplyConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo);
|
||||||
cout << "pst impulse: " << sphere_a_body.qdot.transpose() << endl;
|
|
||||||
cout << "pst impulse2: " << sphere_b_body.qdot.transpose() << endl;
|
|
||||||
}
|
|
||||||
REQUIRE(sphere_a_body.qdot[1] > -0.1);
|
REQUIRE(sphere_a_body.qdot[1] > -0.1);
|
||||||
REQUIRE(sphere_b_body.qdot[1] < 0.1);
|
REQUIRE(sphere_b_body.qdot[1] < 0.1);
|
||||||
}
|
}
|
||||||
|
@ -386,19 +375,8 @@ TEST_CASE("CalcConstraintImpulse", "[Collision]") {
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("CalculateImpulse") {
|
SECTION("CalculateImpulse") {
|
||||||
for (int i = 0; i < 1; i++) {
|
|
||||||
cout << "Iter " << i << endl;
|
|
||||||
CalcConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo, 0);
|
CalcConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo, 0);
|
||||||
// REQUIRE((cinfo.accumImpulse - Vector3d(0., 0., 0.)).norm() < 1.0e-12);
|
|
||||||
// REQUIRE((cinfo.accumImpulse - Vector3d(0., -sphere_mass * sphere_a_body.qdot[1], 0.)).norm() < 1.0e-12);
|
|
||||||
|
|
||||||
cout << "pre impulse: " << sphere_a_body.qdot.transpose() << endl;
|
|
||||||
cout << "pre impulse2: " << sphere_b_body.qdot.transpose() << endl;
|
|
||||||
cout << "impulse: " << cinfo.deltaImpulse << endl;
|
|
||||||
ApplyConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo);
|
ApplyConstraintImpulse(&sphere_a_body, &sphere_b_body, cinfo);
|
||||||
cout << "pst impulse: " << sphere_a_body.qdot.transpose() << endl;
|
|
||||||
cout << "pst impulse2: " << sphere_b_body.qdot.transpose() << endl;
|
|
||||||
}
|
|
||||||
REQUIRE(sphere_a_body.qdot[1] < 0.1);
|
REQUIRE(sphere_a_body.qdot[1] < 0.1);
|
||||||
REQUIRE(sphere_b_body.qdot[1] > -0.1);
|
REQUIRE(sphere_b_body.qdot[1] > -0.1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue