Explorar o código

Fixed BoundingBox::intersects(BoundingBox)

Darryl Gough %!s(int64=14) %!d(string=hai) anos
pai
achega
6f3b816078
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      gameplay/src/BoundingBox.cpp

+ 3 - 3
gameplay/src/BoundingBox.cpp

@@ -69,9 +69,9 @@ bool BoundingBox::intersects(const BoundingSphere& sphere) const
 
 
 bool BoundingBox::intersects(const BoundingBox& box) const
 bool BoundingBox::intersects(const BoundingBox& box) const
 {
 {
-    return ((min.x >= box.min.x && min.x <= max.x) || (box.min.x >= min.x && box.min.x <= max.x)) &&
-            ((min.y >= box.min.y && min.y <= max.y) || (box.min.y >= min.y && box.min.y <= max.y)) &&
-            ((min.z >= box.min.z && min.z <= max.z) || (box.min.z >= min.z && box.min.z <= max.z));
+    return ((min.x >= box.min.x && min.x <= box.max.x) || (box.min.x >= min.x && box.min.x <= max.x)) &&
+            ((min.y >= box.min.y && min.y <= box.max.y) || (box.min.y >= min.y && box.min.y <= max.y)) &&
+            ((min.z >= box.min.z && min.z <= box.max.z) || (box.min.z >= min.z && box.min.z <= max.z));
 }
 }
 
 
 bool BoundingBox::intersects(const Frustum& frustum) const
 bool BoundingBox::intersects(const Frustum& frustum) const