15 requires std::is_floating_point_v<T>
28 if (!IsFinitePoint(
first) || !IsFinitePoint(
second) ||
29 !IsFinitePoint(
third))
91 return left.Vertices_[0] ==
right.Vertices_[0] &&
92 left.Vertices_[1] ==
right.Vertices_[1] &&
102 const Point3<T>& second,
103 const Point3<T>& third,
104 UncheckedTag) noexcept :
105 Vertices_{first, second, third}
109 [[nodiscard]]
static bool IsFinitePoint(
const Point3<T>& point)
noexcept
111 return std::isfinite(point.X()) && std::isfinite(point.Y()) &&
112 std::isfinite(point.Z());
115 Point3<T> Vertices_[3];
124static_assert(std::is_trivially_copyable_v<mv::math::Triangle3f>);
125static_assert(std::is_standard_layout_v<mv::math::Triangle3f>);
128static_assert(std::is_trivially_copyable_v<mv::math::Triangle3d>);
129static_assert(std::is_standard_layout_v<mv::math::Triangle3d>);
static std::optional< Normal3 > TryFrom(const Vec3< T > &value) noexcept
static Point3 FromVector(const Vec3< T > &value) noexcept
friend bool operator==(const Triangle3 &left, const Triangle3 &right) noexcept
const Point3< T > & First() const noexcept
Point3< T > Centroid() const noexcept
T DoubleArea() const noexcept
const Point3< T > & Second() const noexcept
Vec3< T > Edge02() const noexcept
Vec3< T > Edge01() const noexcept
std::optional< Normal3< T > > TryNormal() const noexcept
Vec3< T > Edge12() const noexcept
const Point3< T > & Third() const noexcept
Triangle3() noexcept=default
static std::optional< Triangle3 > TryFromPoints(const Point3< T > &first, const Point3< T > &second, const Point3< T > &third) noexcept
Vec3< T > Cross(const Vec3< T > &left, const Vec3< T > &right) noexcept
Triangle3< double > Triangle3d
Triangle3< float > Triangle3f
constexpr T LengthSquared(const Quat< T > &value) noexcept