1
0

cCuboid: Added the IsCompletelyInside() function

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1339 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-03-31 18:22:55 +00:00
parent 25742dcd7a
commit 412a80b5c2
4 changed files with 56 additions and 2 deletions

View File

@@ -72,6 +72,22 @@ bool cCuboid::DoesIntersect(const cCuboid & a_Other) const
bool cCuboid::IsCompletelyInside(const cCuboid & a_Outer) const
{
return (
(p1.x >= a_Outer.p1.x) &&
(p2.x <= a_Outer.p2.x) &&
(p1.y >= a_Outer.p1.y) &&
(p2.y <= a_Outer.p2.y) &&
(p1.z >= a_Outer.p1.z) &&
(p2.z <= a_Outer.p2.z)
);
}
void cCuboid::Move(int a_OfsX, int a_OfsY, int a_OfsZ)
{
p1.x += a_OfsX;