diff options
author | Mattes D <github@xoft.cz> | 2019-08-28 08:29:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 08:29:02 +0200 |
commit | 2504538a3a164f27a96f413f5b389f8dad6b2cac (patch) | |
tree | e3478f6779a4dab9ed835edea23c83d1a019a31b /src/Cuboid.h | |
parent | Improved testing framework. (#4376) (diff) | |
download | cuberite-2504538a3a164f27a96f413f5b389f8dad6b2cac.tar cuberite-2504538a3a164f27a96f413f5b389f8dad6b2cac.tar.gz cuberite-2504538a3a164f27a96f413f5b389f8dad6b2cac.tar.bz2 cuberite-2504538a3a164f27a96f413f5b389f8dad6b2cac.tar.lz cuberite-2504538a3a164f27a96f413f5b389f8dad6b2cac.tar.xz cuberite-2504538a3a164f27a96f413f5b389f8dad6b2cac.tar.zst cuberite-2504538a3a164f27a96f413f5b389f8dad6b2cac.zip |
Diffstat (limited to 'src/Cuboid.h')
-rw-r--r-- | src/Cuboid.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Cuboid.h b/src/Cuboid.h index ed36a2298..4fefb8f57 100644 --- a/src/Cuboid.h +++ b/src/Cuboid.h @@ -117,6 +117,28 @@ public: /** If needed, expands the cuboid so that it contains the specified point. Assumes sorted. Doesn't contract. */ void Engulf(Vector3i a_Point); + // tolua_end + + /** Checks the two cuboids for equality. */ + bool operator == (const cCuboid & aOther) const + { + return ( + (p1.x == aOther.p1.x) && + (p1.y == aOther.p1.y) && + (p1.z == aOther.p1.z) && + (p2.x == aOther.p2.x) && + (p2.y == aOther.p2.y) && + (p2.z == aOther.p2.z) + ); + } + + bool operator != (const cCuboid & aOther) const + { + return !operator ==(aOther); + } + + + // tolua_begin private: |