summaryrefslogtreecommitdiffstats
path: root/source/Cuboid.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-31 20:22:55 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-31 20:22:55 +0200
commit412a80b5c2b8c8704a03cb374da21eadee8af531 (patch)
treeb68be943c6f139156573ca02ba160889e4972d82 /source/Cuboid.cpp
parentMineShafts: Added (empty) chests and spiderwebs around (still missing) spawners (diff)
downloadcuberite-412a80b5c2b8c8704a03cb374da21eadee8af531.tar
cuberite-412a80b5c2b8c8704a03cb374da21eadee8af531.tar.gz
cuberite-412a80b5c2b8c8704a03cb374da21eadee8af531.tar.bz2
cuberite-412a80b5c2b8c8704a03cb374da21eadee8af531.tar.lz
cuberite-412a80b5c2b8c8704a03cb374da21eadee8af531.tar.xz
cuberite-412a80b5c2b8c8704a03cb374da21eadee8af531.tar.zst
cuberite-412a80b5c2b8c8704a03cb374da21eadee8af531.zip
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;