83 const std::array<Vec3<T>, 3>
a = {
first.AxisX().Vector(),
84 first.AxisY().Vector(),
85 first.AxisZ().Vector()};
86 const std::array<Vec3<T>, 3>
b = {
second.AxisX().Vector(),
89 const std::array<T, 3>
ae = {
first.HalfExtents().X(),
90 first.HalfExtents().Y(),
91 first.HalfExtents().Z()};
92 const std::array<T, 3>
be = {
second.HalfExtents().X(),
97 const T epsilon = std::numeric_limits<T>::epsilon() *
T(8);
98 for (std::size_t
i = 0
U;
i < 3U; ++
i)
100 for (std::size_t
j = 0
U;
j < 3U; ++
j)
111 for (std::size_t
i = 0
U;
i < 3U; ++
i)
121 for (std::size_t
j = 0
U;
j < 3U; ++
j)
134 for (std::size_t
i = 0
U;
i < 3U; ++
i)
136 const std::size_t
i1 = (
i + 1U) % 3U;
137 const std::size_t
i2 = (
i + 2U) % 3U;
138 for (std::size_t
j = 0
U;
j < 3U; ++
j)
140 const std::size_t
j1 = (
j + 1U) % 3U;
141 const std::size_t
j2 = (
j + 2U) % 3U;
158 template <
typename T>
173 template <
typename T>
static std::optional< Aabb3 > TryFromCenterHalfExtents(const Point3< T > ¢er, const Vec3< T > &halfExtents) noexcept
static std::optional< Direction3 > TryFrom(const Vec3< T > &value) noexcept
static std::optional< Obb3 > TryFromCenterHalfExtents(const Point3< T > ¢er, const Vec3< T > &halfExtents, const Rotation3< T > &orientation=Rotation3< T >::Identity()) noexcept
static std::optional< Ray3 > TryFromOriginDirection(const Point3< T > &origin, const Direction3< T > &direction) noexcept
constexpr T Dot(const Quat< T > &left, const Quat< T > &right) noexcept
bool Intersects(const Ray3< T > &ray, const Sphere3< T > &sphere) noexcept
constexpr T LengthSquared(const Quat< T > &value) noexcept
std::optional< RaySphereHit3< T > > Intersect(const Ray3< T > &ray, const Sphere3< T > &sphere) noexcept
Vec3< T > Rotate(const Rotation3< T > &rotation, const Vec3< T > &vector) noexcept