Math/OrientedBox: Make GetCorners return an EnumArray ref

This commit is contained in:
SirLynix 2023-08-25 17:13:39 +02:00
parent 532b1b2c4d
commit efe36ca6e8
3 changed files with 4 additions and 4 deletions

View File

@ -368,7 +368,7 @@ namespace Nz
template<typename T>
constexpr IntersectionSide Frustum<T>::Intersect(const OrientedBox<T>& orientedbox) const
{
return Intersect(orientedbox.GetCorners(), 8);
return Intersect(orientedbox.GetCorners().data(), 8);
}
/*!

View File

@ -32,7 +32,7 @@ namespace Nz
constexpr bool ApproxEqual(const OrientedBox& obb, T maxDifference = std::numeric_limits<T>::epsilon()) const;
constexpr const Vector3<T>& GetCorner(BoxCorner corner) const;
constexpr const Vector3<T>* GetCorners() const;
constexpr const EnumArray<BoxCorner, Vector3<T>>& GetCorners() const;
constexpr bool IsValid() const;

View File

@ -75,9 +75,9 @@ namespace Nz
}
template<typename T>
constexpr const Vector3<T>* OrientedBox<T>::GetCorners() const
constexpr const EnumArray<BoxCorner, Vector3<T>>& OrientedBox<T>::GetCorners() const
{
return &m_corners.front();
return m_corners;
}
/*!