summaryrefslogtreecommitdiffstats
path: root/src/Cuboid.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-08-09 03:13:15 +0200
committerGitHub <noreply@github.com>2019-08-09 03:13:15 +0200
commite7016b15259f8432e0a333a948498fb280d4d7a9 (patch)
treec762898c05633066e37ec568f0e0146dcd3ab6f5 /src/Cuboid.cpp
parentcBoundingBox: Fix tolua warning (#4361) (diff)
downloadcuberite-e7016b15259f8432e0a333a948498fb280d4d7a9.tar
cuberite-e7016b15259f8432e0a333a948498fb280d4d7a9.tar.gz
cuberite-e7016b15259f8432e0a333a948498fb280d4d7a9.tar.bz2
cuberite-e7016b15259f8432e0a333a948498fb280d4d7a9.tar.lz
cuberite-e7016b15259f8432e0a333a948498fb280d4d7a9.tar.xz
cuberite-e7016b15259f8432e0a333a948498fb280d4d7a9.tar.zst
cuberite-e7016b15259f8432e0a333a948498fb280d4d7a9.zip
Diffstat (limited to 'src/Cuboid.cpp')
-rw-r--r--src/Cuboid.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/Cuboid.cpp b/src/Cuboid.cpp
index 930ee6c0e..93749491e 100644
--- a/src/Cuboid.cpp
+++ b/src/Cuboid.cpp
@@ -10,14 +10,10 @@
////////////////////////////////////////////////////////////////////////////////
// cCuboid:
-void cCuboid::Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
+void cCuboid::Assign(Vector3i a_Point1, Vector3i a_Point2)
{
- p1.x = a_X1;
- p1.y = a_Y1;
- p1.z = a_Z1;
- p2.x = a_X2;
- p2.y = a_Y2;
- p2.z = a_Z2;
+ p1 = a_Point1;
+ p2 = a_Point2;
}
@@ -75,14 +71,10 @@ bool cCuboid::IsCompletelyInside(const cCuboid & a_Outer) const
-void cCuboid::Move(int a_OfsX, int a_OfsY, int a_OfsZ)
+void cCuboid::Move(Vector3i a_Offset)
{
- p1.x += a_OfsX;
- p1.y += a_OfsY;
- p1.z += a_OfsZ;
- p2.x += a_OfsX;
- p2.y += a_OfsY;
- p2.z += a_OfsZ;
+ p1.Move(a_Offset);
+ p2.Move(a_Offset);
}