diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-07 20:23:53 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-11 01:13:59 +0000 |
commit | 9da25631a119fd16f1810a027dae1fde7cb7527d (patch) | |
tree | 210f776fb8940f8b8f7ff6fa43a991076cd954e8 /gfx/aabb.cpp | |
parent | Only render terrain tiles which are visible in the frustum (diff) | |
download | ilt-9da25631a119fd16f1810a027dae1fde7cb7527d.tar.bz2 ilt-9da25631a119fd16f1810a027dae1fde7cb7527d.tar.xz ilt-9da25631a119fd16f1810a027dae1fde7cb7527d.zip |
AxisAlignedBoundingBox construct from range instead of span
Diffstat (limited to 'gfx/aabb.cpp')
-rw-r--r-- | gfx/aabb.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/gfx/aabb.cpp b/gfx/aabb.cpp index 0a04ef4..19c2217 100644 --- a/gfx/aabb.cpp +++ b/gfx/aabb.cpp @@ -1,19 +1,4 @@ #include "aabb.h" -#include <algorithm> -#include <tuple> - -AxisAlignedBoundingBox -AxisAlignedBoundingBox::fromPoints(const std::span<const GlobalPosition3D> points) -{ - using Limits = std::numeric_limits<GlobalDistance>; - static constexpr const auto INITIAL - = std::make_pair(GlobalPosition3D {Limits::max()}, GlobalPosition3D {Limits::min()}); - return std::make_from_tuple<AxisAlignedBoundingBox>( - std::ranges::fold_left(points, INITIAL, [](const auto & prev, const auto & point) { - auto & [min, max] = prev; - return std::make_pair(glm::min(min, point), glm::max(max, point)); - })); -} AxisAlignedBoundingBox & AxisAlignedBoundingBox::operator+=(const GlobalPosition3D & point) |