11#ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
22#define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
33
4+ #include < string>
5+
46#include " ./raylib-cpp-utils.hpp"
57#include " ./raylib.hpp"
68
@@ -11,7 +13,7 @@ namespace raylib {
1113 * Bounding box type
1214 */
1315class BoundingBox : public ::BoundingBox {
14- public:
16+ public:
1517 /*
1618 * Copy a bounding box from another bounding box.
1719 */
@@ -40,10 +42,8 @@ class BoundingBox : public ::BoundingBox {
4042 }
4143
4244 [[nodiscard]] std::string ToString () const {
43- return ::TextFormat (
44- " BoundingBox(min=(%f, %f, %f), max=(%f, %f, %f))" ,
45- min.x , min.y , min.z , max.x , max.y , max.z
46- );
45+ return ::TextFormat (" BoundingBox(min=(%f, %f, %f), max=(%f, %f, %f))" ,
46+ min.x , min.y , min.z , max.x , max.y , max.z );
4747 }
4848
4949 operator std::string () const { return ToString (); }
@@ -61,7 +61,9 @@ class BoundingBox : public ::BoundingBox {
6161 /* *
6262 * Detect collision between box and sphere
6363 */
64- RLCPP_NODISCARD bool CheckCollision (::Vector3 center, float radius) const { return CheckCollisionBoxSphere (*this , center, radius); }
64+ RLCPP_NODISCARD bool CheckCollision (::Vector3 center, float radius) const {
65+ return CheckCollisionBoxSphere (*this , center, radius);
66+ }
6567
6668 /* *
6769 * Detect collision between ray and bounding box
@@ -72,7 +74,8 @@ class BoundingBox : public ::BoundingBox {
7274 * Get collision information between ray and bounding box
7375 */
7476 RayCollision GetCollision (const ::Ray& ray) const { return GetRayCollisionBox (ray, *this ); }
75- protected:
77+
78+ protected:
7679 void set (const ::BoundingBox& box) {
7780 min = box.min ;
7881 max = box.max ;
@@ -82,8 +85,8 @@ class BoundingBox : public ::BoundingBox {
8285 max = _max;
8386 }
8487};
85- } // namespace raylib
88+ } // namespace raylib
8689
8790using RBoundingBox = raylib::BoundingBox;
8891
89- #endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
92+ #endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
0 commit comments