17#pragma warning (disable : 4459)
47#if ENABLE_NAN_DIAGNOSTIC
314 if constexpr (std::is_same_v<T, float>)
318 else if constexpr (std::is_same_v<T, double>)
324 static_assert(
sizeof(T) == 0,
"Unimplemented");
355 template<
typename FArg UE_REQUIRES(!std::is_same_v<T, FArg>)>
357 :
TPlane<T>((T)From.
X, (T)From.
Y, (T)From.
Z, (T)From.
W)
373 P.DiagnosticCheckNaN();
401 P.DiagnosticCheckNaN();
458 return !this->IsNearlyZero();
470 return GetNormal() * W;
476 return X * P.X +
Y * P.Y +
Z * P.Z - W;
501 return TPlane<T>(GetOrigin() + V, GetNormal());
507 return (
X == V.
X) && (
Y == V.
Y) && (
Z == V.
Z) && (W == V.
W);
514 return (
X != V.
X) || (
Y != V.
Y) || (
Z != V.
Z) || (W != V.
W);
521 return (FMath::Abs(
X - V.
X) < Tolerance) && (FMath::Abs(
Y - V.
Y) < Tolerance) && (FMath::Abs(
Z - V.
Z) < Tolerance) && (FMath::Abs(W - V.
W) < Tolerance);
528 return X * V.
X +
Y * V.
Y +
Z * V.
Z + W * V.
W;
571 X += V.
X;
Y += V.
Y;
Z += V.
Z; W += V.
W;
579 X -= V.
X;
Y -= V.
Y;
Z -= V.
Z; W -= V.
W;
595 X *= V.
X;
Y *= V.
Y;
Z *= V.
Z; W *= V.
W;
615 return *
this -
Plane * (2.f *
Plane.PlaneDot(*
this));
649 const TVector PlaneOrigin = PlaneNormal *
Plane.W;
651 const T
Distance = TVector::DotProduct((PlaneOrigin - RayOrigin), PlaneNormal) / TVector::DotProduct(RayDirection, PlaneNormal);
652 return RayOrigin + RayDirection *
Distance;
660 const TVector PlaneOrigin = PlaneNormal *
Plane.W;
662 return TVector::DotProduct((PlaneOrigin - RayOrigin), PlaneNormal) / TVector::DotProduct(RayDirection, PlaneNormal);
683 const T
Det = (P1 ^ P2) | P3;
693 I = (P1.
W * (P2 ^ P3) + P2.
W * (P3 ^ P1) + P3.
W * (P1 ^ P2)) /
Det;
713 I = (P1.
W * (P2 ^
D) + P2.
W * (
D ^ P1)) /
DD;
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
EForceInit
Definition CoreMiscDefines.h:154
@ ForceInitToZero
Definition CoreMiscDefines.h:156
@ ForceInit
Definition CoreMiscDefines.h:155
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_SERIALIZE_VARIANT_FROM_MISMATCHED_TAG(AR_OR_SLOT, ALIAS, TYPE, ALT_TYPE)
Definition LargeWorldCoordinatesSerializer.h:9
#define UE_DECLARE_LWC_TYPE(...)
Definition LargeWorldCoordinates.h:27
#define logOrEnsureNanError(_FormatString_,...)
Definition LogMacros.h:436
@ LARGE_WORLD_COORDINATES
#define Square(a, x, y)
Definition Predicates.inl:251
#define UE_SMALL_NUMBER
Definition UnrealMathUtility.h:130
#define UE_KINDA_SMALL_NUMBER
Definition UnrealMathUtility.h:131
Definition Archive.h:1208
UE_FORCEINLINE_HINT bool IsLoading() const
Definition Archive.h:236
UE_FORCEINLINE_HINT FPackageFileVersion UEVer() const
Definition Archive.h:204
Definition NameTypes.h:617
FArchive & operator<<(FArchive &Ar, TBoxSphereBounds< float, float > &Bounds)
Definition BoxSphereBounds.h:396
Definition AdvancedWidgetsModule.cpp:13
static UE::Math::TVector< FReal > LinePlaneIntersection(const UE::Math::TVector< FReal > &Point1, const UE::Math::TVector< FReal > &Point2, const UE::Math::TVector< FReal > &PlaneOrigin, const UE::Math::TVector< FReal > &PlaneNormal)
static FReal RayPlaneIntersectionParam(const UE::Math::TVector< FReal > &RayOrigin, const UE::Math::TVector< FReal > &RayDirection, const UE::Math::TPlane< FReal > &Plane)
static bool IntersectPlanes2(UE::Math::TVector< FReal > &I, UE::Math::TVector< FReal > &D, const UE::Math::TPlane< FReal > &P1, const UE::Math::TPlane< FReal > &P2)
static bool IntersectPlanes3(UE::Math::TVector< FReal > &I, const UE::Math::TPlane< FReal > &P1, const UE::Math::TPlane< FReal > &P2, const UE::Math::TPlane< FReal > &P3)
static UE::Math::TVector< FReal > RayPlaneIntersection(const UE::Math::TVector< FReal > &RayOrigin, const UE::Math::TVector< FReal > &RayDirection, const UE::Math::TPlane< FReal > &Plane)
Definition IsPODType.h:12
@ Value
Definition IsPODType.h:13
Definition IsUECoreType.h:19
@ Value
Definition IsUECoreType.h:20
TPlane(T InX, T InY, T InZ, T InW)
Definition Plane.h:417
TPlane< T > operator-(const TPlane< T > &V) const
Definition Plane.h:540
TPlane< T > operator*(const TPlane< T > &V) const
Definition Plane.h:562
UE_FORCEINLINE_HINT TPlane(const TVector4< T > &V)
Definition Plane.h:410
bool SerializeFromMismatchedTag(FName StructTag, FArchive &Ar)
Definition Plane.h:312
T FReal
Definition Plane.h:37
bool operator==(const TPlane< T > &V) const
Definition Plane.h:505
TPlane< T > operator+=(const TPlane< T > &V)
Definition Plane.h:569
UE_FORCEINLINE_HINT void DiagnosticCheckNaN() const
Definition Plane.h:57
bool Serialize(FArchive &Ar)
Definition Plane.h:302
TPlane(TVector< T > A, TVector< T > B, TVector< T > C)
Definition Plane.h:442
bool Normalize(T Tolerance=UE_SMALL_NUMBER)
Definition Plane.h:480
TPlane< T > operator*(T Scale) const
Definition Plane.h:555
TPlane(TVector< T > InBase, const TVector< T > &InNormal)
Definition Plane.h:433
UE_FORCEINLINE_HINT TPlane(EForceInit)
Definition Plane.h:451
TPlane< T > Flip() const
Definition Plane.h:493
TPlane< T > TransformByUsingAdjointT(const TMatrix< T > &M, T DetM, const TMatrix< T > &TA) const
Definition Matrix.inl:923
bool operator!=(const TPlane< T > &V) const
Definition Plane.h:512
UE_FORCEINLINE_HINT T operator|(const TPlane< T > &V) const
Definition Plane.h:526
TPlane< T > operator/=(T V)
Definition Plane.h:601
TPlane< T > operator+(const TPlane< T > &V) const
Definition Plane.h:533
TPlane(const TPlane< FArg > &From)
Definition Plane.h:356
UE_FORCEINLINE_HINT const TVector< T > & GetNormal() const
Definition Plane.h:462
UE_FORCEINLINE_HINT TVector< T > GetOrigin() const
Definition Plane.h:468
TPlane< T > operator/(T Scale) const
Definition Plane.h:547
TPlane< T > operator-=(const TPlane< T > &V)
Definition Plane.h:577
TPlane(TVector< T > InNormal, T InW)
Definition Plane.h:426
TPlane< T > TransformBy(const TMatrix< T > &M) const
Definition Matrix.inl:915
bool NetSerialize(FArchive &Ar, class UPackageMap *, bool &bOutSuccess)
Definition Plane.h:334
UE_FORCEINLINE_HINT T PlaneDot(const TVector< T > &P) const
Definition Plane.h:474
TPlane< T > operator*=(T Scale)
Definition Plane.h:585
UE_FORCEINLINE_HINT bool IsValid() const
Definition Plane.h:456
TPlane< T > operator*=(const TPlane< T > &V)
Definition Plane.h:593
TPlane< T > TranslateBy(const TVector< T > &V) const
Definition Plane.h:499
bool Equals(const TPlane< T > &V, T Tolerance=UE_KINDA_SMALL_NUMBER) const
Definition Plane.h:519
T Z
Definition Vector.h:68
T Y
Definition Vector.h:65
TVector< T > MirrorByPlane(const TPlane< T > &Plane) const
Definition Plane.h:613
bool Normalize(T Tolerance=UE_SMALL_NUMBER)
Definition Vector.h:1767
T X
Definition Vector.h:62
UE_FORCEINLINE_HINT TVector< T > operator-() const
Definition Vector.h:1614
static TVector< T > PointPlaneProject(const TVector< T > &Point, const TPlane< T > &Plane)
Definition Plane.h:619
T SizeSquared() const
Definition Vector.h:1728