]> git.localhorst.tv Git - blank.git/blobdiff - src/model/shape.cpp
figure out depth and normal in box/box test
[blank.git] / src / model / shape.cpp
index 82659437f60fc87506f3847e181494514a99a7cd..8aa1c257e0d8f65eb69b54d588b4e763e30296bf 100644 (file)
@@ -180,7 +180,9 @@ bool CuboidShape::Intersects(
        const AABB &box,
        const glm::mat4 &box_M
 ) const noexcept {
-       return Intersection(bb, M, box, box_M);
+       float depth;
+       glm::vec3 normal;
+       return Intersection(bb, M, box, box_M, depth, normal);
 }
 
 
@@ -347,7 +349,9 @@ bool StairShape::Intersects(
        const AABB &box,
        const glm::mat4 &box_M
 ) const noexcept {
-       return Intersection(bot, M, box, box_M) || Intersection(top, M, box, box_M);
+       float depth;
+       glm::vec3 normal;
+       return Intersection(bot, M, box, box_M, depth, normal) || Intersection(top, M, box, box_M, depth, normal);
 }
 
 }