Fixed KRAABB::Intersect bug, which returned false negatives due to an invalid z-axis test.

--HG--
branch : nfb
This commit is contained in:
2014-03-05 22:47:48 -08:00
parent 6f7359baf6
commit e6bed1265b

View File

@@ -131,7 +131,7 @@ bool KRAABB::operator <(const KRAABB& b) const
bool KRAABB::intersects(const KRAABB& b) const bool KRAABB::intersects(const KRAABB& b) const
{ {
// Return true if the two volumes intersect // Return true if the two volumes intersect
return min.x <= b.max.x && min.y <= b.max.y && min.z <= b.max.z && max.x >= b.min.x && max.y >= b.min.y && max.z >= b.max.z; return min.x <= b.max.x && min.y <= b.max.y && min.z <= b.max.z && max.x >= b.min.x && max.y >= b.min.y && max.z >= b.min.z;
} }
bool KRAABB::contains(const KRAABB &b) const bool KRAABB::contains(const KRAABB &b) const