diff options
Diffstat (limited to 'src/graphics/Frustrum.hpp')
-rw-r--r-- | src/graphics/Frustrum.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/graphics/Frustrum.hpp b/src/graphics/Frustrum.hpp new file mode 100644 index 0000000..e8a6fd6 --- /dev/null +++ b/src/graphics/Frustrum.hpp @@ -0,0 +1,24 @@ +#ifndef _FRUSTUM_H +#define _FRUSTUM_H + + +#include <cmath> +#include <algorithm> +#include <GL/glew.h> +#include <glm/glm.hpp> +#include <glm/gtc/type_ptr.hpp> + +class Frustum { +public: + Frustum() = default; + + ~Frustum() = default; + + void CalculateFrustum(glm::mat4 &view_matrix, glm::mat4 &proj_matrix); + + glm::vec4 frustum_planes[6]; + + bool TestInsideFrustrum(glm::vec4 Min, glm::vec4 Max); +}; + +#endif
\ No newline at end of file |