summaryrefslogtreecommitdiff
path: root/test/test-lib.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-13 20:42:33 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-13 20:42:33 +0000
commitb9771cbeb80e5b540587a01be145154612bbc83d (patch)
tree6dff7eb8ff1deaa4b11697d7b5a27fac8bff3432 /test/test-lib.cpp
parentSplit core view definition out of Camera into Frustum (diff)
parentSplit Terrain::generateMeshes into smaller functions (diff)
downloadilt-b9771cbeb80e5b540587a01be145154612bbc83d.tar.bz2
ilt-b9771cbeb80e5b540587a01be145154612bbc83d.tar.xz
ilt-b9771cbeb80e5b540587a01be145154612bbc83d.zip
Merge branch 'culling'
Diffstat (limited to 'test/test-lib.cpp')
-rw-r--r--test/test-lib.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test-lib.cpp b/test/test-lib.cpp
index 17c0f63..ec91f6e 100644
--- a/test/test-lib.cpp
+++ b/test/test-lib.cpp
@@ -6,6 +6,7 @@
#include <stream_support.h>
#include <collections.h>
+#include <gfx/aabb.h>
#include <glArrays.h>
#include <glad/gl.h>
#include <set>
@@ -110,3 +111,14 @@ BOOST_DATA_TEST_CASE(mergeCloseInts,
tolerance)));
BOOST_CHECK_EQUAL_COLCOL(mutableCollection, expected);
}
+
+BOOST_AUTO_TEST_CASE(aabb_from_points)
+{
+ const auto aabb = AxisAlignedBoundingBox<GlobalDistance>::fromPoints(std::vector<GlobalPosition3D> {
+ {1, 2, 3},
+ {4, 2, 1},
+ {9, 1, 7},
+ });
+ BOOST_CHECK_EQUAL(aabb.min, GlobalPosition3D(1, 1, 1));
+ BOOST_CHECK_EQUAL(aabb.max, GlobalPosition3D(9, 2, 7));
+}