added ratio param

This commit is contained in:
2025-04-18 01:33:47 +03:00
parent 0ce30a7038
commit 97c2da893b
2 changed files with 4 additions and 3 deletions

View File

@@ -10,5 +10,5 @@ namespace omath::primitives
{
[[nodiscard]]
std::array<Vector3<float>, 8> CreateBox(const Vector3<float>& top, const Vector3<float>& bottom,
const Vector3<float>& dirForward, const Vector3<float>& dirRight);
const Vector3<float>& dirForward, const Vector3<float>& dirRight, float ratio = 4.f);
}

View File

@@ -8,10 +8,11 @@ namespace omath::primitives
std::array<Vector3<float>, 8> CreateBox(const Vector3<float>& top, const Vector3<float>& bottom,
const Vector3<float>& dirForward,
const Vector3<float>& dirRight)
const Vector3<float>& dirRight,
const float ratio)
{
const auto height = top.DistTo(bottom);
const auto sideSize = height / 6.f;
const auto sideSize = height / ratio;
std::array<Vector3<float>, 8> points;