Finality Engine
Loading...
Searching...
No Matches
Frustum.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <glm/glm.hpp>
9
10namespace FINALITY
11{
13 class Frustum
14 {
15 public:
16 Frustum() = default;
17
18 static Frustum FromViewProjection(const glm::mat4& viewProjection);
19
20 bool IntersectsSphere(const glm::vec3& center, float radius) const;
21 bool IntersectsAABB(const glm::vec3& min, const glm::vec3& max) const;
22 private:
23 glm::vec4 m_Planes[6] = {};
24 };
25}
static Frustum FromViewProjection(const glm::mat4 &viewProjection)
bool IntersectsSphere(const glm::vec3 &center, float radius) const
bool IntersectsAABB(const glm::vec3 &min, const glm::vec3 &max) const