diff --git a/include/BoundingBox.hpp b/include/BoundingBox.hpp index 52dc3ef..9759e71 100644 --- a/include/BoundingBox.hpp +++ b/include/BoundingBox.hpp @@ -9,7 +9,17 @@ namespace raylib { * Bounding box type */ class BoundingBox : public ::BoundingBox { - public: +public: + /* + * Set the bounding box to default: min (0, 0, 0) and max (0, 0, 0). + */ + BoundingBox() { + set(RVector3(0, 0, 0), RVector3(0, 0, 0)); + } + + /* + * Copy a bounding box from another bounding box. + */ BoundingBox(const ::BoundingBox& box) { set(box); } @@ -68,11 +78,15 @@ class BoundingBox : public ::BoundingBox { return GetRayCollisionBox(ray, *this); } - private: +private: void set(const ::BoundingBox& box) { min = box.min; max = box.max; } + void set(const Vector3& _min, const Vector3& _max) { + min = _min; + max = _max; + } }; } // namespace raylib using RBoundingBox = raylib::BoundingBox;