diff --git a/include/omath/3d_primitives/box.hpp b/include/omath/3d_primitives/box.hpp index afc7003..bbe43b2 100644 --- a/include/omath/3d_primitives/box.hpp +++ b/include/omath/3d_primitives/box.hpp @@ -10,5 +10,5 @@ namespace omath::primitives { [[nodiscard]] std::array, 8> CreateBox(const Vector3& top, const Vector3& bottom, - const Vector3& dirForward, const Vector3& dirRight); + const Vector3& dirForward, const Vector3& dirRight, float ratio = 4.f); } diff --git a/source/3d_primitives/box.cpp b/source/3d_primitives/box.cpp index 652cef6..4403b23 100644 --- a/source/3d_primitives/box.cpp +++ b/source/3d_primitives/box.cpp @@ -8,10 +8,11 @@ namespace omath::primitives std::array, 8> CreateBox(const Vector3& top, const Vector3& bottom, const Vector3& dirForward, - const Vector3& dirRight) + const Vector3& dirRight, + const float ratio) { const auto height = top.DistTo(bottom); - const auto sideSize = height / 6.f; + const auto sideSize = height / ratio; std::array, 8> points;