diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2022-07-11 00:55:11 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2022-07-19 23:33:09 +0200 |
commit | cd97aa83307ce33068082dc57deee8d922fec432 (patch) | |
tree | 7ea02bf81e102e80df32d527a085c3ecd3f66d44 /src/BoundingBox.h | |
parent | ClientHandle: fix incorrect position floor (diff) | |
download | cuberite-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.h | 17 |
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 - - - - |