X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgeometry.hpp;h=16651d82be46427b89296784c46735cc65a2c9c2;hb=c3c5045f06327db2a3c97eae77a072bc06677286;hp=bcc9c9a0918ef1dabfe270441818340bc1f45104;hpb=8881c507009521d08648560984c0f50166224542;p=blank.git diff --git a/src/geometry.hpp b/src/geometry.hpp index bcc9c9a..16651d8 100644 --- a/src/geometry.hpp +++ b/src/geometry.hpp @@ -7,6 +7,11 @@ namespace blank { +constexpr float PI = 3.141592653589793238462643383279502884; +constexpr float PI_0p5 = PI * 0.5f; +constexpr float PI_1p5 = PI * 1.5f; +constexpr float PI_2p0 = PI * 2.0f; + struct AABB { glm::vec3 min; glm::vec3 max; @@ -30,6 +35,8 @@ bool Intersection( float *dist = nullptr, glm::vec3 *normal = nullptr); +bool CullTest(const AABB &box, const glm::mat4 &MVP); + } #endif