summaryrefslogtreecommitdiff
path: root/test/test-maths.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 13:51:33 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 14:14:13 +0000
commit7fba471728f2216d7e3b7900297fc3b3531e286c (patch)
tree5caef3b2efc23aefccb215ec9005cd8e7d2e91b8 /test/test-maths.cpp
parentFix todo for handling a terrain walk from outside the mesh (diff)
parentModel positions as integers (diff)
downloadilt-7fba471728f2216d7e3b7900297fc3b3531e286c.tar.bz2
ilt-7fba471728f2216d7e3b7900297fc3b3531e286c.tar.xz
ilt-7fba471728f2216d7e3b7900297fc3b3531e286c.zip
Merge branch 'ints' into terrain
Conflicts fix, compiles, some test failures remain. Trees not added, possibility of OM invalid handle assertion failures, normals broken due to integer overflow in Newell's method.
Diffstat (limited to 'test/test-maths.cpp')
-rw-r--r--test/test-maths.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test-maths.cpp b/test/test-maths.cpp
index 2560319..9eae918 100644
--- a/test/test-maths.cpp
+++ b/test/test-maths.cpp
@@ -196,12 +196,12 @@ BOOST_DATA_TEST_CASE(straight1,
const TestLinkStraight l(v);
{
const auto p = l.positionAt(0, 0);
- BOOST_CHECK_EQUAL(p.pos, origin);
+ BOOST_CHECK_EQUAL(p.pos, GlobalPosition3D {origin});
BOOST_CHECK_EQUAL(p.rot, glm::vec3(0, angFor, 0));
}
{
const auto p = l.positionAt(0, 1);
- BOOST_CHECK_EQUAL(p.pos, v);
+ BOOST_CHECK_EQUAL(p.pos, GlobalPosition3D {v});
BOOST_CHECK_EQUAL(p.rot, glm::vec3(0, angBack, 0));
}
}
@@ -231,12 +231,12 @@ BOOST_DATA_TEST_CASE(curve1,
BOOST_CHECK_EQUAL(l.radius, 1.F);
{
const auto p = l.positionAt(0, 0);
- BOOST_CHECK_CLOSE_VEC(p.pos, origin);
+ BOOST_CHECK_CLOSE_VEC(RelativePosition3D {p.pos}, origin);
BOOST_CHECK_CLOSE_VEC(p.rot, glm::vec3(0, angFor, 0));
}
{
const auto p = l.positionAt(0, 1);
- BOOST_CHECK_CLOSE_VEC(p.pos, e1);
+ BOOST_CHECK_CLOSE_VEC(RelativePosition3D {p.pos}, e1);
BOOST_CHECK_CLOSE_VEC(p.rot, glm::vec3(0, angBack, 0));
}
}
@@ -247,13 +247,13 @@ BOOST_DATA_TEST_CASE(curve1,
{
const auto p = l.positionAt(0, 0);
const auto angForReversed = normalize(vector_yaw(origin - e1) * 2 - angFor);
- BOOST_CHECK_CLOSE_VEC(p.pos, e1);
+ BOOST_CHECK_CLOSE_VEC(RelativePosition3D {p.pos}, e1);
BOOST_CHECK_CLOSE_VEC(p.rot, glm::vec3(0, angForReversed, 0));
}
{
const auto p = l.positionAt(0, 1);
const auto angBackReversed = normalize(vector_yaw(e1 - origin) * 2 - angBack);
- BOOST_CHECK_CLOSE_VEC(p.pos, origin);
+ BOOST_CHECK_CLOSE_VEC(RelativePosition3D {p.pos}, origin);
BOOST_CHECK_CLOSE_VEC(p.rot, glm::vec3(0, angBackReversed, 0));
}
}