]> git.localhorst.tv Git - blank.git/blobdiff - src/geometry/primitive.hpp
some linting
[blank.git] / src / geometry / primitive.hpp
index 76064c1b13f8ce2e26ef26075e3e44b8dce9c750..52a3617835245382b6e2014091116cc881fc3c87 100644 (file)
@@ -102,7 +102,7 @@ struct Plane {
 
        Plane(const glm::vec3 &n, float d)
        : normal(n), dist(d) { }
-       Plane(const glm::vec4 &abcd)
+       explicit Plane(const glm::vec4 &abcd)
        : normal(abcd), dist(abcd.w) { }
 
        void Normalize() noexcept {
@@ -130,14 +130,14 @@ struct Frustum {
        const Plane &Far() const noexcept { return plane[5]; }
 
        /// create frustum from transposed MVP
-       Frustum(const glm::mat4 &mat)
+       explicit Frustum(const glm::mat4 &mat)
        : plane{
-               { mat[3] + mat[0] },
-               { mat[3] - mat[0] },
-               { mat[3] + mat[1] },
-               { mat[3] - mat[1] },
-               { mat[3] + mat[2] },
-               { mat[3] - mat[2] },
+               Plane{ mat[3] + mat[0] },
+               Plane{ mat[3] - mat[0] },
+               Plane{ mat[3] + mat[1] },
+               Plane{ mat[3] - mat[1] },
+               Plane{ mat[3] + mat[2] },
+               Plane{ mat[3] - mat[2] },
        } { }
 
        void Normalize() noexcept {