diff --git a/include/Nazara/Math/Box.inl b/include/Nazara/Math/Box.inl index 8f8a92df1..aa11b69e8 100644 --- a/include/Nazara/Math/Box.inl +++ b/include/Nazara/Math/Box.inl @@ -313,14 +313,14 @@ namespace Nz constexpr EnumArray> Box::GetCorners() const { return { - GetCorner(Nz::BoxCorner::FarLeftBottom), - GetCorner(Nz::BoxCorner::FarLeftTop), - GetCorner(Nz::BoxCorner::FarRightBottom), - GetCorner(Nz::BoxCorner::FarRightTop), - GetCorner(Nz::BoxCorner::NearLeftBottom), - GetCorner(Nz::BoxCorner::NearLeftTop), - GetCorner(Nz::BoxCorner::NearRightBottom), - GetCorner(Nz::BoxCorner::NearRightTop) + GetCorner(BoxCorner::FarLeftBottom), + GetCorner(BoxCorner::FarLeftTop), + GetCorner(BoxCorner::FarRightBottom), + GetCorner(BoxCorner::FarRightTop), + GetCorner(BoxCorner::NearLeftBottom), + GetCorner(BoxCorner::NearLeftTop), + GetCorner(BoxCorner::NearRightBottom), + GetCorner(BoxCorner::NearRightTop) }; } @@ -691,19 +691,6 @@ namespace Nz return lhs.ApproxEqual(rhs, maxDifference); } - /*! - * \brief Interpolates the box to other one with a factor of interpolation - * \return A new box which is the interpolation of two rectangles - * - * \param from Initial box - * \param to Target box - * \param interpolation Factor of interpolation - * - * \remark interpolation is meant to be between 0 and 1, other values are potentially undefined behavior - * \remark With NAZARA_DEBUG, a NazaraError is thrown and Zero() is returned - * - * \see Lerp - */ template constexpr Box Box::FromExtends(const Vector3& vec1, const Vector3& vec2) { diff --git a/include/Nazara/Math/Rect.inl b/include/Nazara/Math/Rect.inl index 2cc0e19c6..724049ac8 100644 --- a/include/Nazara/Math/Rect.inl +++ b/include/Nazara/Math/Rect.inl @@ -254,10 +254,10 @@ namespace Nz constexpr EnumArray> Rect::GetCorners() const { return { - GetCorner(Nz::RectCorner::LeftBottom), - GetCorner(Nz::RectCorner::LeftTop), - GetCorner(Nz::RectCorner::RightBottom), - GetCorner(Nz::RectCorner::RightTop) + GetCorner(RectCorner::LeftBottom), + GetCorner(RectCorner::LeftTop), + GetCorner(RectCorner::RightBottom), + GetCorner(RectCorner::RightTop) }; } diff --git a/include/Nazara/Renderer/DebugDrawer.inl b/include/Nazara/Renderer/DebugDrawer.inl index c7735d5c5..934723e08 100644 --- a/include/Nazara/Renderer/DebugDrawer.inl +++ b/include/Nazara/Renderer/DebugDrawer.inl @@ -28,9 +28,7 @@ namespace Nz inline void DebugDrawer::DrawFrustum(const Frustumf& frustum, const Color& color) { - EnumArray corners; - for (auto&& [corner, pos] : corners.iter_kv()) - pos = frustum.ComputeCorner(corner); + EnumArray corners = frustum.ComputeCorners(); DrawLine(corners[BoxCorner::NearLeftBottom], corners[BoxCorner::NearRightBottom], color); DrawLine(corners[BoxCorner::NearLeftBottom], corners[BoxCorner::NearLeftTop], color);