UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Math::TPlane< T > Struct Template Reference

#include <Plane.h>

+ Inheritance diagram for UE::Math::TPlane< T >:

Public Types

using FReal = T
 
- Public Types inherited from UE::Math::TVector< T >
using FReal = T
 

Public Member Functions

UE_FORCEINLINE_HINT void DiagnosticCheckNaN () const
 
 TPlane ()=default
 
UE_FORCEINLINE_HINT TPlane (const TVector4< T > &V)
 
 TPlane (T InX, T InY, T InZ, T InW)
 
 TPlane (TVector< T > InNormal, T InW)
 
 TPlane (TVector< T > InBase, const TVector< T > &InNormal)
 
 TPlane (TVector< T > A, TVector< T > B, TVector< T > C)
 
UE_FORCEINLINE_HINT TPlane (EForceInit)
 
UE_FORCEINLINE_HINT bool IsValid () const
 
UE_FORCEINLINE_HINT TVector< T > GetOrigin () const
 
UE_FORCEINLINE_HINT const TVector< T > & GetNormal () const
 
UE_FORCEINLINE_HINTPlaneDot (const TVector< T > &P) const
 
bool Normalize (T Tolerance=UE_SMALL_NUMBER)
 
TPlane< T > Flip () const
 
TPlane< T > TransformBy (const TMatrix< T > &M) const
 
TPlane< T > TransformByUsingAdjointT (const TMatrix< T > &M, T DetM, const TMatrix< T > &TA) const
 
TPlane< T > TranslateBy (const TVector< T > &V) const
 
bool operator== (const TPlane< T > &V) const
 
bool operator!= (const TPlane< T > &V) const
 
bool Equals (const TPlane< T > &V, T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
UE_FORCEINLINE_HINToperator| (const TPlane< T > &V) const
 
TPlane< T > operator+ (const TPlane< T > &V) const
 
TPlane< T > operator- (const TPlane< T > &V) const
 
TPlane< T > operator/ (T Scale) const
 
TPlane< T > operator* (T Scale) const
 
TPlane< T > operator* (const TPlane< T > &V) const
 
TPlane< T > operator+= (const TPlane< T > &V)
 
TPlane< T > operator-= (const TPlane< T > &V)
 
TPlane< T > operator*= (T Scale)
 
TPlane< T > operator*= (const TPlane< T > &V)
 
TPlane< T > operator/= (T V)
 
bool Serialize (FArchive &Ar)
 
bool SerializeFromMismatchedTag (FName StructTag, FArchive &Ar)
 
bool NetSerialize (FArchive &Ar, class UPackageMap *, bool &bOutSuccess)
 
template<typename FArg UE_REQUIRES>
 TPlane (const TPlane< FArg > &From)
 
- Public Member Functions inherited from UE::Math::TVector< T >
UE_FORCEINLINE_HINT void DiagnosticCheckNaN () const
 
UE_FORCEINLINE_HINT void DiagnosticCheckNaN (const TCHAR *Message) const
 
 TVector ()=default
 
 TVector (T InF)
 
UE_FORCEINLINE_HINT constexpr TVector (T InF, TVectorConstInit)
 
 TVector (T InX, T InY, T InZ)
 
 TVector (const TVector2< T > V, T InZ)
 
 TVector (const UE::Math::TVector4< T > &V)
 
 TVector (const FLinearColor &InColor)
 
template<typename IntType >
 TVector (TIntVector3< IntType > InVector)
 
template<typename IntType >
 TVector (TIntPoint< IntType > A)
 
 TVector (EForceInit)
 
TVector< T > operator^ (const TVector< T > &V) const
 
UE_FORCEINLINE_HINT TVector< T > Cross (const TVector< T > &V2) const
 
UE_FORCEINLINE_HINToperator| (const TVector< T > &V) const
 
UE_FORCEINLINE_HINTDot (const TVector< T > &V) const
 
UE_FORCEINLINE_HINT TVector< T > operator+ (const TVector< T > &V) const
 
UE_FORCEINLINE_HINT TVector< T > operator- (const TVector< T > &V) const
 
template<typename FArg UE_REQUIRES>
UE_FORCEINLINE_HINT TVector< T > operator- (FArg Bias) const
 
template<typename FArg UE_REQUIRES>
UE_FORCEINLINE_HINT TVector< T > operator+ (FArg Bias) const
 
template<typename FArg UE_REQUIRES>
UE_FORCEINLINE_HINT TVector< T > operator* (FArg Scale) const
 
template<typename FArg UE_REQUIRES>
TVector< T > operator/ (FArg Scale) const
 
UE_FORCEINLINE_HINT TVector< T > operator* (const TVector< T > &V) const
 
UE_FORCEINLINE_HINT TVector< T > operator/ (const TVector< T > &V) const
 
UE_FORCEINLINE_HINT bool operator== (const TVector< T > &V) const
 
UE_FORCEINLINE_HINT bool operator!= (const TVector< T > &V) const
 
UE_FORCEINLINE_HINT bool Equals (const TVector< T > &V, T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
UE_FORCEINLINE_HINT bool AllComponentsEqual (T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
UE_FORCEINLINE_HINT TVector< T > operator- () const
 
TVector< T > operator+= (const TVector< T > &V)
 
TVector< T > operator-= (const TVector< T > &V)
 
template<typename FArg UE_REQUIRES>
TVector< T > operator*= (FArg Scale)
 
template<typename FArg UE_REQUIRES>
TVector< T > operator/= (FArg Scale)
 
TVector< T > operator*= (const TVector< T > &V)
 
TVector< T > operator/= (const TVector< T > &V)
 
T & operator[] (int32 Index)
 
operator[] (int32 Index) const
 
T & Component (int32 Index)
 
Component (int32 Index) const
 
bool IsValidIndex (int32 Index) const
 
GetComponentForAxis (EAxis::Type Axis) const
 
void SetComponentForAxis (EAxis::Type Axis, T Component)
 
void Set (T InX, T InY, T InZ)
 
GetMax () const
 
GetAbsMax () const
 
GetMin () const
 
GetAbsMin () const
 
TVector< T > ComponentMin (const TVector< T > &Other) const
 
TVector< T > ComponentMax (const TVector< T > &Other) const
 
TVector< T > GetAbs () const
 
Size () const
 
Length () const
 
SizeSquared () const
 
SquaredLength () const
 
Size2D () const
 
SizeSquared2D () const
 
bool IsNearlyZero (T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
bool IsZero () const
 
UE_FORCEINLINE_HINT bool IsUnit (T LengthSquaredTolerance=UE_KINDA_SMALL_NUMBER) const
 
bool IsNormalized () const
 
bool Normalize (T Tolerance=UE_SMALL_NUMBER)
 
TVector< T > GetUnsafeNormal () const
 
TVector< T > GetSafeNormal (T Tolerance=UE_SMALL_NUMBER, const TVector< T > &ResultIfZero=ZeroVector) const
 
TVector< T > GetSafeNormal2D (T Tolerance=UE_SMALL_NUMBER, const TVector< T > &ResultIfZero=ZeroVector) const
 
void ToDirectionAndLength (TVector< T > &OutDir, double &OutLength) const
 
void ToDirectionAndLength (TVector< T > &OutDir, float &OutLength) const
 
TVector< T > GetSignVector () const
 
TVector< T > Projection () const
 
TVector< T > GetUnsafeNormal2D () const
 
TVector< T > GridSnap (const T &GridSz) const
 
TVector< T > BoundToCube (T Radius) const
 
TVector< T > BoundToBox (const TVector< T > &Min, const TVector< T > &Max) const
 
TVector< T > GetClampedToSize (T Min, T Max) const
 
TVector< T > GetClampedToSize2D (T Min, T Max) const
 
TVector< T > GetClampedToMaxSize (T MaxSize) const
 
TVector< T > GetClampedToMaxSize2D (T MaxSize) const
 
void AddBounded (const TVector< T > &V, T Radius=MAX_int16)
 
TVector< T > Reciprocal () const
 
bool IsUniform (T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
TVector< T > MirrorByVector (const TVector< T > &MirrorNormal) const
 
TVector< T > MirrorByPlane (const TPlane< T > &Plane) const
 
TVector< T > RotateAngleAxis (const T AngleDeg, const TVector< T > &Axis) const
 
TVector< T > RotateAngleAxisRad (const T AngleRad, const TVector< T > &Axis) const
 
CosineAngle2D (TVector< T > B) const
 
UE_FORCEINLINE_HINT TVector< T > ProjectOnTo (const TVector< T > &A) const
 
UE_FORCEINLINE_HINT TVector< T > ProjectOnToNormal (const TVector< T > &Normal) const
 
CORE_API TRotator< T > ToOrientationRotator () const
 
CORE_API TQuat< T > ToOrientationQuat () const
 
UE_FORCEINLINE_HINT UE::Math::TRotator< T > Rotation () const
 
void FindBestAxisVectors (TVector< T > &Axis1, TVector< T > &Axis2) const
 
void UnwindEuler ()
 
bool ContainsNaN () const
 
FString ToString () const
 
FText ToText () const
 
FString ToCompactString () const
 
FText ToCompactText () const
 
bool InitFromString (const FString &InSourceString)
 
bool InitFromCompactString (const FString &InSourceString)
 
TVector2< T > UnitCartesianToSpherical () const
 
HeadingAngle () const
 
bool Serialize (FArchive &Ar)
 
bool Serialize (FStructuredArchive::FSlot Slot)
 
bool SerializeFromMismatchedTag (FName StructTag, FStructuredArchive::FSlot Slot)
 
bool NetSerialize (FArchive &Ar, class UPackageMap *Map, bool &bOutSuccess)
 
template<typename FArg UE_REQUIRES>
 TVector (const TVector< FArg > &From)
 

Public Attributes

W
 
- Public Attributes inherited from UE::Math::TVector< T >
union { 
 
   struct { 
 
      T   X 
 
      T   Y 
 
      T   Z 
 
   }  
 
   T   XYZ [3] 
 
};  
 

Additional Inherited Members

- Static Public Member Functions inherited from UE::Math::TVector< T >
static TVector< T > Zero ()
 
static TVector< T > One ()
 
static TVector< T > UnitX ()
 
static TVector< T > UnitY ()
 
static TVector< T > UnitZ ()
 
static UE_FORCEINLINE_HINT TVector< T > CrossProduct (const TVector< T > &A, const TVector< T > &B)
 
static UE_FORCEINLINE_HINTDotProduct (const TVector< T > &A, const TVector< T > &B)
 
static CORE_API TVector< T > SlerpVectorToDirection (const TVector< T > &V, const TVector< T > &Direction, T Alpha)
 
static CORE_API TVector< T > SlerpNormals (const TVector< T > &NormalA, const TVector< T > &NormalB, T Alpha)
 
static void CreateOrthonormalBasis (TVector< T > &XAxis, TVector< T > &YAxis, TVector< T > &ZAxis)
 
static bool PointsAreSame (const TVector< T > &P, const TVector< T > &Q)
 
static bool PointsAreNear (const TVector< T > &Point1, const TVector< T > &Point2, T Dist)
 
staticPointPlaneDist (const TVector< T > &Point, const TVector< T > &PlaneBase, const TVector< T > &PlaneNormal)
 
static TVector< T > PointPlaneProject (const TVector< T > &Point, const TPlane< T > &Plane)
 
static TVector< T > PointPlaneProject (const TVector< T > &Point, const TVector< T > &A, const TVector< T > &B, const TVector< T > &C)
 
static TVector< T > PointPlaneProject (const TVector< T > &Point, const TVector< T > &PlaneBase, const TVector< T > &PlaneNormal)
 
static TVector< T > VectorPlaneProject (const TVector< T > &V, const TVector< T > &PlaneNormal)
 
static UE_FORCEINLINE_HINTDist (const TVector< T > &V1, const TVector< T > &V2)
 
static UE_FORCEINLINE_HINTDistance (const TVector< T > &V1, const TVector< T > &V2)
 
static UE_FORCEINLINE_HINTDistXY (const TVector< T > &V1, const TVector< T > &V2)
 
static UE_FORCEINLINE_HINTDist2D (const TVector< T > &V1, const TVector< T > &V2)
 
static UE_FORCEINLINE_HINTDistSquared (const TVector< T > &V1, const TVector< T > &V2)
 
static UE_FORCEINLINE_HINTDistSquaredXY (const TVector< T > &V1, const TVector< T > &V2)
 
static UE_FORCEINLINE_HINTDistSquared2D (const TVector< T > &V1, const TVector< T > &V2)
 
static UE_FORCEINLINE_HINTBoxPushOut (const TVector< T > &Normal, const TVector< T > &Size)
 
static TVector< T > Min (const TVector< T > &A, const TVector< T > &B)
 
static TVector< T > Max (const TVector< T > &A, const TVector< T > &B)
 
static TVector< T > Min3 (const TVector< T > &A, const TVector< T > &B, const TVector< T > &C)
 
static TVector< T > Max3 (const TVector< T > &A, const TVector< T > &B, const TVector< T > &C)
 
static bool Parallel (const TVector< T > &Normal1, const TVector< T > &Normal2, T ParallelCosineThreshold=UE_THRESH_NORMALS_ARE_PARALLEL)
 
static bool Coincident (const TVector< T > &Normal1, const TVector< T > &Normal2, T ParallelCosineThreshold=UE_THRESH_NORMALS_ARE_PARALLEL)
 
static bool Orthogonal (const TVector< T > &Normal1, const TVector< T > &Normal2, T OrthogonalCosineThreshold=UE_THRESH_NORMALS_ARE_ORTHOGONAL)
 
static bool Coplanar (const TVector< T > &Base1, const TVector< T > &Normal1, const TVector< T > &Base2, const TVector< T > &Normal2, T ParallelCosineThreshold=UE_THRESH_NORMALS_ARE_PARALLEL)
 
staticTriple (const TVector< T > &X, const TVector< T > &Y, const TVector< T > &Z)
 
staticEvaluateBezier (const TVector< T > *ControlPoints, int32 NumPoints, TArray< TVector< T > > &OutPoints)
 
static TVector< T > RadiansToDegrees (const TVector< T > &RadVector)
 
static TVector< T > DegreesToRadians (const TVector< T > &DegVector)
 
static void GenerateClusterCenters (TArray< TVector< T > > &Clusters, const TArray< TVector< T > > &Points, int32 NumIterations, int32 NumConnectionsToBeValid)
 
- Static Public Attributes inherited from UE::Math::TVector< T >
static constexpr int32 NumComponents = 3
 
static CORE_API const TVector< T > ZeroVector
 
static CORE_API const TVector< T > OneVector
 
static CORE_API const TVector< T > UpVector
 
static CORE_API const TVector< T > DownVector
 
static CORE_API const TVector< T > ForwardVector
 
static CORE_API const TVector< T > BackwardVector
 
static CORE_API const TVector< T > RightVector
 
static CORE_API const TVector< T > LeftVector
 
static CORE_API const TVector< T > XAxisVector
 
static CORE_API const TVector< T > YAxisVector
 
static CORE_API const TVector< T > ZAxisVector
 

Member Typedef Documentation

◆ FReal

template<typename T >
using UE::Math::TPlane< T >::FReal = T

Constructor & Destructor Documentation

◆ TPlane() [1/8]

template<typename T >
UE::Math::TPlane< T >::TPlane ( )
default

Default constructor (no initialization).

◆ TPlane() [2/8]

template<typename T >
UE_FORCEINLINE_HINT UE::Math::TPlane< T >::TPlane ( const TVector4< T > &  V)

Constructor.

Parameters
V4D vector to set up plane.

◆ TPlane() [3/8]

template<typename T >
UE::Math::TPlane< T >::TPlane ( InX,
InY,
InZ,
InW 
)
inline

Constructor.

Parameters
InXX-coefficient.
InYY-coefficient.
InZZ-coefficient.
InWW-coefficient.

◆ TPlane() [4/8]

template<typename T >
UE::Math::TPlane< T >::TPlane ( TVector< T >  InNormal,
InW 
)
inline

Constructor.

Parameters
InNormalPlane Normal Vector.
InWPlane W-coefficient.

◆ TPlane() [5/8]

template<typename T >
UE::Math::TPlane< T >::TPlane ( TVector< T >  InBase,
const TVector< T > &  InNormal 
)
inline

Constructor.

Parameters
InBaseBase point in plane.
InNormalPlane Normal Vector.

◆ TPlane() [6/8]

template<typename T >
UE::Math::TPlane< T >::TPlane ( TVector< T >  A,
TVector< T >  B,
TVector< T >  C 
)
inline

Constructor.

Parameters
AFirst point in the plane.
BSecond point in the plane.
CThird point in the plane.

◆ TPlane() [7/8]

template<typename T >
UE_FORCEINLINE_HINT UE::Math::TPlane< T >::TPlane ( EForceInit  )
explicit

Constructor

Parameters
EForceInitForce Init Enum.

◆ TPlane() [8/8]

template<typename T >
template<typename FArg UE_REQUIRES>
UE::Math::TPlane< T >::TPlane ( const TPlane< FArg > &  From)
inlineexplicit

Member Function Documentation

◆ DiagnosticCheckNaN()

template<typename T >
UE_FORCEINLINE_HINT void UE::Math::TPlane< T >::DiagnosticCheckNaN ( ) const
inline

◆ Equals()

template<typename T >
UE_FORCEINLINE_HINT bool UE::Math::TPlane< T >::Equals ( const TPlane< T > &  V,
Tolerance = UE_KINDA_SMALL_NUMBER 
) const

Checks whether two planes are equal within specified tolerance.

Parameters
VThe other plane.
ToleranceError Tolerance.
Returns
true if the two planes are equal within specified tolerance, otherwise false.

◆ Flip()

template<typename T >
UE_FORCEINLINE_HINT TPlane< T > UE::Math::TPlane< T >::Flip ( ) const

Get a flipped version of the plane.

Returns
A flipped version of the plane.

◆ GetNormal()

template<typename T >
UE_FORCEINLINE_HINT const TVector< T > & UE::Math::TPlane< T >::GetNormal ( ) const

Get the normal of this plane.

Returns
The normal of this plane.

◆ GetOrigin()

template<typename T >
UE_FORCEINLINE_HINT TVector< T > UE::Math::TPlane< T >::GetOrigin ( ) const

Get the origin of this plane.

Returns
The origin (base point) of this plane.

◆ IsValid()

template<typename T >
UE_FORCEINLINE_HINT bool UE::Math::TPlane< T >::IsValid ( ) const

Checks if this plane is valid (ie: if it has a non-zero normal).

Returns
true if the plane is well-defined (has a non-zero normal), otherwise false.

◆ NetSerialize()

template<typename T >
bool UE::Math::TPlane< T >::NetSerialize ( FArchive Ar,
class UPackageMap ,
bool bOutSuccess 
)
inline

Serializes the vector compressed for e.g. network transmission.

Parameters
ArArchive to serialize to/ from.
Returns
false to allow the ordinary struct code to run (this never happens).

◆ Normalize()

template<typename T >
bool UE::Math::TPlane< T >::Normalize ( Tolerance = UE_SMALL_NUMBER)
inline

Normalize this plane in-place if it is larger than a given tolerance. Leaves it unchanged if not.

Parameters
ToleranceMinimum squared length of vector for normalization.
Returns
true if the plane was normalized correctly, false otherwise.

◆ operator!=()

template<typename T >
UE_FORCEINLINE_HINT bool UE::Math::TPlane< T >::operator!= ( const TPlane< T > &  V) const

Check if two planes are different.

Parameters
VThe other plane.
Returns
true if planes are different, otherwise false.

◆ operator*() [1/2]

template<typename T >
UE_FORCEINLINE_HINT TPlane< T > UE::Math::TPlane< T >::operator* ( const TPlane< T > &  V) const

Gets result of multiplying a plane with this.

Parameters
VThe other plane.
Returns
The result of multiplying a plane with this.

◆ operator*() [2/2]

template<typename T >
UE_FORCEINLINE_HINT TPlane< T > UE::Math::TPlane< T >::operator* ( Scale) const

Gets result of scaling a plane.

Parameters
ScaleThe scaling factor.
Returns
The result of scaling.

◆ operator*=() [1/2]

template<typename T >
TPlane< T > UE::Math::TPlane< T >::operator*= ( const TPlane< T > &  V)
inline

Multiply another plane with this.

Parameters
VThe other plane.
Returns
Copy of plane after multiplication.

◆ operator*=() [2/2]

template<typename T >
TPlane< T > UE::Math::TPlane< T >::operator*= ( Scale)
inline

Scale this plane.

Parameters
ScaleThe scaling factor.
Returns
Copy of plane after scaling.

◆ operator+()

template<typename T >
UE_FORCEINLINE_HINT TPlane< T > UE::Math::TPlane< T >::operator+ ( const TPlane< T > &  V) const

Gets result of adding a plane to this.

Parameters
VThe other plane.
Returns
The result of adding a plane to this.

◆ operator+=()

template<typename T >
TPlane< T > UE::Math::TPlane< T >::operator+= ( const TPlane< T > &  V)
inline

Add another plane to this.

Parameters
VThe other plane.
Returns
Copy of plane after addition.

◆ operator-()

template<typename T >
UE_FORCEINLINE_HINT TPlane< T > UE::Math::TPlane< T >::operator- ( const TPlane< T > &  V) const

Gets result of subtracting a plane from this.

Parameters
VThe other plane.
Returns
The result of subtracting a plane from this.

◆ operator-=()

template<typename T >
TPlane< T > UE::Math::TPlane< T >::operator-= ( const TPlane< T > &  V)
inline

Subtract another plane from this.

Parameters
VThe other plane.
Returns
Copy of plane after subtraction.

◆ operator/()

template<typename T >
TPlane< T > UE::Math::TPlane< T >::operator/ ( Scale) const
inline

Gets result of dividing a plane.

Parameters
ScaleWhat to divide by.
Returns
The result of division.

◆ operator/=()

template<typename T >
TPlane< T > UE::Math::TPlane< T >::operator/= ( V)
inline

Divide this plane.

Parameters
VWhat to divide by.
Returns
Copy of plane after division.

◆ operator==()

template<typename T >
UE_FORCEINLINE_HINT bool UE::Math::TPlane< T >::operator== ( const TPlane< T > &  V) const

Check if two planes are identical.

Parameters
VThe other plane.
Returns
true if planes are identical, otherwise false.

◆ operator|()

template<typename T >
UE_FORCEINLINE_HINT T UE::Math::TPlane< T >::operator| ( const TPlane< T > &  V) const

Calculates dot product of two planes.

Parameters
VThe other plane.
Returns
The dot product.

◆ PlaneDot()

template<typename T >
UE_FORCEINLINE_HINT T UE::Math::TPlane< T >::PlaneDot ( const TVector< T > &  P) const

Calculates distance between plane and a point.

Parameters
PThe other point.
Returns
The distance from the plane to the point. 0: Point is on the plane. >0: Point is in front of the plane. <0: Point is behind the plane.

◆ Serialize()

template<typename T >
bool UE::Math::TPlane< T >::Serialize ( FArchive Ar)
inline

◆ SerializeFromMismatchedTag()

template<typename T >
bool UE::Math::TPlane< T >::SerializeFromMismatchedTag ( FName  StructTag,
FArchive Ar 
)
inline

◆ TransformBy()

template<typename T >
TPlane< T > UE::Math::TPlane< T >::TransformBy ( const TMatrix< T > &  M) const
inline

Get the result of transforming the plane by a Matrix.

Parameters
MThe matrix to transform plane with.
Returns
The result of transform.

TPlane inline functions.

◆ TransformByUsingAdjointT()

template<typename T >
TPlane< T > UE::Math::TPlane< T >::TransformByUsingAdjointT ( const TMatrix< T > &  M,
DetM,
const TMatrix< T > &  TA 
) const
inline

You can optionally pass in the matrices transpose-adjoint, which save it recalculating it. MSM: If we are going to save the transpose-adjoint we should also save the more expensive determinant.

Parameters
MThe Matrix to transform plane with.
DetMDeterminant of Matrix.
TATranspose-adjoint of Matrix.
Returns
The result of transform.

◆ TranslateBy()

template<typename T >
UE_FORCEINLINE_HINT TPlane< T > UE::Math::TPlane< T >::TranslateBy ( const TVector< T > &  V) const

Get the result of translating the plane by the given offset

Parameters
VThe translation amount
Returns
The result of transform.

Member Data Documentation

◆ W

template<typename T >
T UE::Math::TPlane< T >::W

The w-component.


The documentation for this struct was generated from the following files: