diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-06-14 16:22:52 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-06-14 16:22:52 +0200 |
commit | ac8905602d1f221a71ddcdc86796344101276321 (patch) | |
tree | 21deaeb615d6789e7ddf14844cbf8faf0081af7e /src/graphics/Frustrum.hpp | |
parent | 2017-06-07 (diff) | |
download | AltCraft-ac8905602d1f221a71ddcdc86796344101276321.tar AltCraft-ac8905602d1f221a71ddcdc86796344101276321.tar.gz AltCraft-ac8905602d1f221a71ddcdc86796344101276321.tar.bz2 AltCraft-ac8905602d1f221a71ddcdc86796344101276321.tar.lz AltCraft-ac8905602d1f221a71ddcdc86796344101276321.tar.xz AltCraft-ac8905602d1f221a71ddcdc86796344101276321.tar.zst AltCraft-ac8905602d1f221a71ddcdc86796344101276321.zip |
Diffstat (limited to '')
-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 |