diff options
Diffstat (limited to '')
-rw-r--r-- | src/Frustum.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/Frustum.hpp b/src/Frustum.hpp new file mode 100644 index 0000000..4817cd4 --- /dev/null +++ b/src/Frustum.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include <glm/glm.hpp> +#include "Vector.hpp" + +class Frustum { + enum FrustumSide { + RIGHT = 0, + LEFT, + BOTTOM, + TOP, + BACK, + FRONT, + }; + enum PlaneData { + A = 0, + B, + C, + D, + }; + + glm::mat4 vp; + float frustum[6][4]; + void NormalizePlane(FrustumSide side); + +public: + Frustum() = default; + + ~Frustum() = default; + + void UpdateFrustum(const glm::mat4& vpmat); + + //Return true, if tested point is visible + bool TestPoint(VectorF point); +};
\ No newline at end of file |