Fixed KRAABB::Intersect bug, which returned false negatives due to an invalid z-axis test.
--HG-- branch : nfb
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user