summaryrefslogtreecommitdiffstats
path: root/source/Cuboid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Cuboid.cpp')
-rw-r--r--source/Cuboid.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/Cuboid.cpp b/source/Cuboid.cpp
index b7de25b26..ea6f7c453 100644
--- a/source/Cuboid.cpp
+++ b/source/Cuboid.cpp
@@ -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;