Add aabbox3d::isValid() function to check if MaxEdge > MinEdge
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5820 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
294da48122
commit
5c10d53a20
|
@ -189,6 +189,16 @@ class aabbox3d
|
|||
{ t=MinEdge.Z; MinEdge.Z = MaxEdge.Z; MaxEdge.Z=t; }
|
||||
}
|
||||
|
||||
// Check if MaxEdge > MinEdge
|
||||
bool isValid()
|
||||
{
|
||||
if (MinEdge.X > MaxEdge.X) return false;
|
||||
if (MinEdge.Y > MaxEdge.Y) return false;
|
||||
if (MinEdge.Z > MaxEdge.Z) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//! Calculates a new interpolated bounding box.
|
||||
/** d=0 returns other, d=1 returns this, all other values blend between
|
||||
the two boxes.
|
||||
|
|
Loading…
Reference in New Issue