]> git.localhorst.tv Git - tacos.git/blobdiff - tst/world/FloorTest.cpp
better ray/floor intersection algorithm
[tacos.git] / tst / world / FloorTest.cpp
index 169dba84529ec3c32c60a3ecf6e67aadc5ed86f6..396c0651cc5c309ddba1b828e7dfc08dfe80b286 100644 (file)
@@ -4,8 +4,6 @@
 
 #include <world/Floor.hpp>
 
-#include <glm/gtx/io.hpp>
-
 CPPUNIT_TEST_SUITE_REGISTRATION(tacos::test::FloorTest);
 
 namespace tacos {
@@ -136,7 +134,7 @@ void FloorTest::testIntersection() {
        ray.origin = glm::vec3(19.993f, 49.947f, 106.518f);
        ray.direction = glm::normalize(glm::vec3(-0.07f, -0.528f, -0.846f));
        CPPUNIT_ASSERT_MESSAGE(
-               "weird ray from interactive testing doesn't intersect :(",
+               "weird ray #1 from interactive testing doesn't intersect :(",
                floor.Intersection(ray, point)
        );
        AssertEqual(
@@ -147,12 +145,12 @@ void FloorTest::testIntersection() {
        ray.origin = glm::vec3(19.995f, 49.952f, 106.515f);
        ray.direction = glm::normalize(glm::vec3(-0.046f, -0.477f, -0.878f));
        CPPUNIT_ASSERT_MESSAGE(
-               "weird ray from interactive testing doesn't intersect :(",
+               "weird ray #2 from interactive testing doesn't intersect :(",
                floor.Intersection(ray, point)
        );
        AssertEqual(
                "unexpected intersection point",
-               glm::vec3(15.17783f, 0.0f, 14.5698f), point,
+               glm::vec3(15.17783f, 0.0f, 14.56982f), point,
                0.00001f
        );
 }