]> git.localhorst.tv Git - orbi.git/blobdiff - src/world/AABB.cpp
entity/entity collision stub
[orbi.git] / src / world / AABB.cpp
index edce97e313dfe3f832dab4204f6ca0d100dc7643..92c8ba2014f017632c54e7c50074010f8f973a86 100644 (file)
@@ -6,11 +6,16 @@
 
 namespace orbi {
 
-bool AABB::Intersects(const AABB &other, Collision &coll) const {
+bool AABB::Intersects(const AABB &other) const {
        if (Bottom() < other.Top()) return false;
        if (other.Bottom() < Top()) return false;
        if (Right() < other.Left()) return false;
        if (other.Right() < Left()) return false;
+       return true;
+}
+
+bool AABB::Intersects(const AABB &other, Collision &coll) const {
+       if (!Intersects(other)) return false;
 
        AABB diff;
        diff.lt = max(lt, other.lt);