summaryrefslogtreecommitdiff
path: root/test/test-terrain.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-04 12:14:59 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-04 12:26:00 +0000
commitc463bce75418a145d319f214571e30df311ff8df (patch)
tree07dab50c7ad4b728aff6b993bdc9bcf43b912c58 /test/test-terrain.cpp
parentStatic helper for loading ASCII grid data (diff)
downloadilt-c463bce75418a145d319f214571e30df311ff8df.tar.bz2
ilt-c463bce75418a145d319f214571e30df311ff8df.tar.xz
ilt-c463bce75418a145d319f214571e30df311ff8df.zip
Calculate and expose the extents of the terrain mesh
Diffstat (limited to 'test/test-terrain.cpp')
-rw-r--r--test/test-terrain.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test-terrain.cpp b/test/test-terrain.cpp
index 512a90e..71fc1ec 100644
--- a/test/test-terrain.cpp
+++ b/test/test-terrain.cpp
@@ -19,6 +19,9 @@ BOOST_AUTO_TEST_CASE(loadSuccess)
{
BOOST_CHECK_EQUAL(ncols * nrows, n_vertices());
BOOST_CHECK_EQUAL(2 * (ncols - 1) * (nrows - 1), n_faces());
+ const auto [lower, upper] = getExtents();
+ BOOST_CHECK_EQUAL(lower, glm::vec3(310000, 490000, -2.6));
+ BOOST_CHECK_EQUAL(upper, glm::vec3(320000, 500000, 571.6));
}
BOOST_AUTO_TEST_CASE(normalsAllPointUp)