Math/Frustum: Add GetPlanes()

This commit is contained in:
SirLynix 2023-06-21 19:49:32 +02:00
parent 2a9ec4f3bb
commit 9eb4c43997
2 changed files with 7 additions and 0 deletions

View File

@ -46,6 +46,7 @@ namespace Nz
constexpr bool Contains(const Vector3<T>* points, std::size_t pointCount) const;
constexpr const Plane<T>& GetPlane(FrustumPlane plane) const;
constexpr const EnumArray<FrustumPlane, Plane<T>>& GetPlanes() const;
constexpr IntersectionSide Intersect(const BoundingVolume<T>& volume) const;
constexpr IntersectionSide Intersect(const Box<T>& box) const;

View File

@ -239,6 +239,12 @@ namespace Nz
return m_planes[plane];
}
template<typename T>
constexpr const EnumArray<FrustumPlane, Plane<T>>& Frustum<T>::GetPlanes() const
{
return m_planes;
}
/*!
* \brief Checks whether or not a bounding volume intersects with the frustum
* \return IntersectionSide How the bounding volume is intersecting with the frustum