|
|
@@ -189,7 +189,8 @@ TEST_SUITE("EPATests")
|
|
|
Sphere sphere(Vec3(0, 0, 0), 1.0f);
|
|
|
EPAPenetrationDepth epa;
|
|
|
float lambda = 1.0f + FLT_EPSILON;
|
|
|
- Vec3 pa, pb, normal;
|
|
|
+ const Vec3 invalid(-999, -999, -999);
|
|
|
+ Vec3 pa = invalid, pb = invalid, normal = invalid;
|
|
|
CHECK(epa.CastShape(Mat44::sTranslation(Vec3(-1, 0, 0)), Vec3(10, 0, 0), 1.0e-4f, 1.0e-4f, sphere, sphere, 0.0f, 0.0f, true, lambda, pa, pb, normal));
|
|
|
CHECK(lambda == 0.0f);
|
|
|
CHECK_APPROX_EQUAL(pa, Vec3::sZero(), 5.0e-3f);
|
|
|
@@ -202,7 +203,8 @@ TEST_SUITE("EPATests")
|
|
|
Sphere sphere(Vec3(0, 0, 0), 1.0f);
|
|
|
EPAPenetrationDepth epa;
|
|
|
float lambda = 1.0f + FLT_EPSILON;
|
|
|
- Vec3 pa, pb, normal;
|
|
|
+ const Vec3 invalid(-999, -999, -999);
|
|
|
+ Vec3 pa = invalid, pb = invalid, normal = invalid;
|
|
|
CHECK(epa.CastShape(Mat44::sTranslation(Vec3(-10, 0, 0)), Vec3(20, 0, 0), 1.0e-4f, 1.0e-4f, sphere, sphere, 0.0f, 0.0f, true, lambda, pa, pb, normal));
|
|
|
CHECK_APPROX_EQUAL(lambda, 8.0f / 20.0f);
|
|
|
CHECK_APPROX_EQUAL(pa, Vec3(-1, 0, 0));
|