29 requires std::is_floating_point_v<T>
36 for (std::size_t index = 0
U; index < 6U; ++index)
44 AbsoluteNormals_[index] =
58 return AbsoluteNormals_[
static_cast<std::size_t
>(
plane)];
63 std::array<Vec3<T>, 6> AbsoluteNormals_{};
71 template <
typename T,
typename RadiusForPlane>
82 for (std::size_t index = 0
U; index < 6U; ++index)
107 template <
typename T>
122 template <
typename T>
129 return detail::ClassifyAgainstFrustum(
133 return sphere.Radius();
137 template <
typename T>
150 return detail::ClassifyAgainstFrustum(
154 return Dot(prepared.AbsoluteNormal(plane), *halfExtents);
158 template <
typename T>
165 const std::array<Vec3<T>, 3>
axes = {
166 box.AxisX().Vector(),
box.AxisY().Vector(),
box.AxisZ().Vector()};
167 return detail::ClassifyAgainstFrustum(
171 const Vec3<T> normal =
172 prepared.Frustum().Plane(plane).Normal().Vector();
173 return box.HalfExtents().X() * std::abs(Dot(normal, axes[0])) +
174 box.HalfExtents().Y() * std::abs(Dot(normal, axes[1])) +
175 box.HalfExtents().Z() * std::abs(Dot(normal, axes[2]));
179 template <
typename T,
typename Bounds>
const Frustum3< T > & Frustum() const noexcept
PreparedFrustum3(const Frustum3< T > &frustum) noexcept
const Vec3< T > & AbsoluteNormal(FrustumPlane plane) const noexcept
CullingResult Classify(const PreparedFrustum3< T > &prepared, const Point3< T > &point, FrustumPlaneMask active=FrustumPlaneMask::All, T tolerance=T(0)) noexcept
constexpr FrustumPlaneMask PlaneMask(FrustumPlane plane) noexcept
constexpr bool HasPlane(FrustumPlaneMask mask, FrustumPlane plane) noexcept
FrustumPlaneMask RemainingPlanes
Containment Classification