summaryrefslogtreecommitdiffstats
path: root/src/BoundingBox.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-07-11 00:55:11 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2022-07-19 23:33:09 +0200
commitcd97aa83307ce33068082dc57deee8d922fec432 (patch)
tree7ea02bf81e102e80df32d527a085c3ecd3f66d44 /src/BoundingBox.h
parentClientHandle: fix incorrect position floor (diff)
downloadcuberite-Pickups.tar
cuberite-Pickups.tar.gz
cuberite-Pickups.tar.bz2
cuberite-Pickups.tar.lz
cuberite-Pickups.tar.xz
cuberite-Pickups.tar.zst
cuberite-Pickups.zip
Diffstat (limited to 'src/BoundingBox.h')
-rw-r--r--src/BoundingBox.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/BoundingBox.h b/src/BoundingBox.h
index e62711658..8ac5e1097 100644
--- a/src/BoundingBox.h
+++ b/src/BoundingBox.h
@@ -23,6 +23,7 @@ the boxes are considered non-intersecting. */
class cBoundingBox
{
public:
+
cBoundingBox(double a_MinX, double a_MaxX, double a_MinY, double a_MaxY, double a_MinZ, double a_MaxZ);
cBoundingBox(Vector3d a_Min, Vector3d a_Max);
cBoundingBox(Vector3d a_Pos, double a_Radius, double a_Height);
@@ -46,22 +47,22 @@ public:
void Expand(double a_ExpandX, double a_ExpandY, double a_ExpandZ);
/** Returns true if the two bounding boxes intersect */
- bool DoesIntersect(const cBoundingBox & a_Other);
+ bool DoesIntersect(const cBoundingBox & a_Other) const;
/** Returns the union of the two bounding boxes */
- cBoundingBox Union(const cBoundingBox & a_Other);
+ cBoundingBox Union(const cBoundingBox & a_Other) const;
/** Returns true if the point is inside the bounding box */
- bool IsInside(Vector3d a_Point);
+ bool IsInside(Vector3d a_Point) const;
/** Returns true if the point is inside the bounding box */
- bool IsInside(double a_X, double a_Y, double a_Z);
+ bool IsInside(double a_X, double a_Y, double a_Z) const;
/** Returns true if a_Other is inside this bounding box */
- bool IsInside(cBoundingBox & a_Other);
+ bool IsInside(cBoundingBox & a_Other) const;
/** Returns true if a boundingbox specified by a_Min and a_Max is inside this bounding box */
- bool IsInside(Vector3d a_Min, Vector3d a_Max);
+ bool IsInside(Vector3d a_Min, Vector3d a_Max) const;
/** Returns true if the specified point is inside the bounding box specified by its min / max corners */
static bool IsInside(Vector3d a_Min, Vector3d a_Max, Vector3d a_Point);
@@ -107,7 +108,3 @@ protected:
Vector3d m_Max;
} ; // tolua_export
-
-
-
-