summaryrefslogtreecommitdiff
path: root/gfx/frustum.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/frustum.h')
-rw-r--r--gfx/frustum.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/gfx/frustum.h b/gfx/frustum.h
index a2d90e9..5b7947b 100644
--- a/gfx/frustum.h
+++ b/gfx/frustum.h
@@ -4,6 +4,7 @@
#include "config/types.h"
#include <array>
#include <glm/mat4x4.hpp>
+#include <span>
class Frustum {
public:
@@ -16,6 +17,12 @@ public:
}
[[nodiscard]] auto &
+ getView() const
+ {
+ return view;
+ }
+
+ [[nodiscard]] auto &
getViewProjection() const
{
return viewProjection;
@@ -31,12 +38,12 @@ public:
using BoundingBox = AxisAlignedBoundingBox<GlobalDistance>;
[[nodiscard]] bool contains(const BoundingBox &) const;
- [[nodiscard]] bool shadedBy(const BoundingBox &) const;
+ [[nodiscard]] bool contains(GlobalPosition3D, RelativeDistance size = 0) const;
protected:
- static constexpr size_t FACES = 6;
+ static constexpr size_t FACES = 5;
void updateCache();
- [[nodiscard]] bool boundByPlanes(const BoundingBox &, size_t nplanes) const;
+ [[nodiscard]] bool contains(std::span<const RelativePosition4D>, RelativeDistance) const;
GlobalPosition3D position;
glm::mat4 view, projection;