summaryrefslogtreecommitdiffstats
path: root/src/BoundingBox.h
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-08-17 15:48:38 +0200
committerMattes D <github@xoft.cz>2017-08-17 15:48:38 +0200
commit7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9 (patch)
tree59128a57d87d7826de450a71e060bd869e837a4a /src/BoundingBox.h
parentUpdated docs to mention InfoDump for creating README.md, etc. (#3895) (diff)
downloadcuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.gz
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.bz2
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.lz
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.xz
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.tar.zst
cuberite-7bdbfad1bbabb84e650261ad31d2d9b47f8b12a9.zip
Diffstat (limited to '')
-rw-r--r--src/BoundingBox.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/BoundingBox.h b/src/BoundingBox.h
index 48b9a3d82..809b7fe7c 100644
--- a/src/BoundingBox.h
+++ b/src/BoundingBox.h
@@ -24,9 +24,9 @@ class cBoundingBox
{
public:
cBoundingBox(double a_MinX, double a_MaxX, double a_MinY, double a_MaxY, double a_MinZ, double a_MaxZ);
- cBoundingBox(const Vector3d & a_Min, const Vector3d & a_Max);
- cBoundingBox(const Vector3d & a_Pos, double a_Radius, double a_Height);
- cBoundingBox(const Vector3d & a_Pos, double a_CubeLength);
+ cBoundingBox(Vector3d a_Min, Vector3d a_Max);
+ cBoundingBox(Vector3d a_Pos, double a_Radius, double a_Height);
+ cBoundingBox(Vector3d a_Pos, double a_CubeLength);
cBoundingBox(const cBoundingBox & a_Orig);
cBoundingBox & operator=(const cBoundingBox & a_Other);
@@ -35,7 +35,7 @@ public:
void Move(double a_OffX, double a_OffY, double a_OffZ);
/** Moves the entire boundingbox by the specified offset */
- void Move(const Vector3d & a_Off);
+ void Move(Vector3d a_Off);
/** Expands the bounding box by the specified amount in each direction (so the box becomes larger by 2 * Expand in each direction) */
void Expand(double a_ExpandX, double a_ExpandY, double a_ExpandZ);
@@ -47,7 +47,7 @@ public:
cBoundingBox Union(const cBoundingBox & a_Other);
/** Returns true if the point is inside the bounding box */
- bool IsInside(const Vector3d & a_Point);
+ bool IsInside(Vector3d a_Point);
/** Returns true if the point is inside the bounding box */
bool IsInside(double a_X, double a_Y, double a_Z);
@@ -56,13 +56,13 @@ public:
bool IsInside(cBoundingBox & a_Other);
/** Returns true if a boundingbox specified by a_Min and a_Max is inside this bounding box */
- bool IsInside(const Vector3d & a_Min, const Vector3d & a_Max);
+ bool IsInside(Vector3d a_Min, Vector3d a_Max);
/** Returns true if the specified point is inside the bounding box specified by its min / max corners */
- static bool IsInside(const Vector3d & a_Min, const Vector3d & a_Max, const Vector3d & a_Point);
+ static bool IsInside(Vector3d a_Min, Vector3d a_Max, Vector3d a_Point);
/** Returns true if the specified point is inside the bounding box specified by its min / max corners */
- static bool IsInside(const Vector3d & a_Min, const Vector3d & a_Max, double a_X, double a_Y, double a_Z);
+ static bool IsInside(Vector3d a_Min, Vector3d a_Max, double a_X, double a_Y, double a_Z);
// tolua_end
@@ -70,13 +70,13 @@ public:
Also calculates the distance along the line in which the intersection occurs, and the face hit (BLOCK_FACE_ constants)
Only forward collisions (a_LineCoeff >= 0) are returned.
Exported to Lua manually, because ToLua++ would generate needless input params (a_LineCoeff, a_Face). */
- bool CalcLineIntersection(const Vector3d & a_LinePoint1, const Vector3d & a_LinePoint2, double & a_LineCoeff, eBlockFace & a_Face) const;
+ bool CalcLineIntersection(Vector3d a_LinePoint1, Vector3d a_LinePoint2, double & a_LineCoeff, eBlockFace & a_Face) const;
/** Returns true if the specified bounding box is intersected by the line specified by its two points
Also calculates the distance along the line in which the intersection occurs, and the face hit (BLOCK_FACE_ constants)
Only forward collisions (a_LineCoeff >= 0) are returned.
Exported to Lua manually, because ToLua++ would generate needless input params (a_LineCoeff, a_Face). */
- static bool CalcLineIntersection(const Vector3d & a_Min, const Vector3d & a_Max, const Vector3d & a_LinePoint1, const Vector3d & a_LinePoint2, double & a_LineCoeff, eBlockFace & a_Face);
+ static bool CalcLineIntersection(Vector3d a_Min, Vector3d a_Max, Vector3d a_LinePoint1, Vector3d a_LinePoint2, double & a_LineCoeff, eBlockFace & a_Face);
/** Calculates the intersection of the two bounding boxes; returns true if nonempty.
Exported manually, because ToLua++ would generate needless input params (a_Intersection). */
@@ -92,8 +92,8 @@ public:
double GetMaxY(void) const { return m_Max.y; }
double GetMaxZ(void) const { return m_Max.z; }
- const Vector3d & GetMin(void) const { return m_Min; }
- const Vector3d & GetMax(void) const { return m_Max; }
+ Vector3d GetMin(void) const { return m_Min; }
+ Vector3d GetMax(void) const { return m_Max; }
// tolua_end