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

#include <IntPoint.h>

Public Types

using IntType = InIntType
 

Public Member Functions

 TIntPoint ()=default
 
 TIntPoint (IntType InX, IntType InY)
 
 TIntPoint (IntType InXY)
 
 TIntPoint (EForceInit)
 
template<typename OtherIntType >
 TIntPoint (TIntPoint< OtherIntType > Other)
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS TIntPoint (TIntPoint &&)=default
 
 TIntPoint (const TIntPoint &)=default
 
TIntPointoperator= (TIntPoint &&)=default
 
TIntPointoperator= (const TIntPoint &)=default
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntTypeoperator() (int32 PointIndex) const
 
IntTypeoperator() (int32 PointIndex)
 
bool operator== (const TIntPoint &Other) const
 
bool operator!= (const TIntPoint &Other) const
 
TIntPointoperator*= (IntType Scale)
 
TIntPointoperator/= (IntType Divisor)
 
TIntPointoperator+= (const TIntPoint &Other)
 
TIntPointoperator*= (const TIntPoint &Other)
 
TIntPointoperator-= (const TIntPoint &Other)
 
TIntPointoperator/= (const TIntPoint &Other)
 
TIntPoint operator* (IntType Scale) const
 
TIntPoint operator/ (IntType Divisor) const
 
TIntPoint operator+ (const TIntPoint &Other) const
 
TIntPoint operator- (const TIntPoint &Other) const
 
TIntPoint operator* (const TIntPoint &Other) const
 
TIntPoint operator/ (const TIntPoint &Other) const
 
IntTypeoperator[] (IntType Index)
 
IntType operator[] (IntType Index) const
 
TIntPoint ComponentMin (const TIntPoint &Other) const
 
TIntPoint ComponentMax (const TIntPoint &Other) const
 
IntType GetMax () const
 
IntType GetMin () const
 
IntType Size () const
 
IntType SizeSquared () const
 
FString ToString () const
 
bool InitFromString (const FString &InSourceString)
 
bool Serialize (FArchive &Ar)
 
bool SerializeFromMismatchedTag (FName StructTag, FArchive &Ar)
 
FString ToString () const
 
FString ToString () const
 
FString ToString () const
 
FString ToString () const
 
FString ToString () const
 
FString ToString () const
 
FString ToString () const
 
FString ToString () const
 

Static Public Member Functions

static TIntPoint DivideAndRoundUp (TIntPoint lhs, IntType Divisor)
 
static TIntPoint DivideAndRoundUp (TIntPoint lhs, TIntPoint Divisor)
 
static TIntPoint DivideAndRoundDown (TIntPoint lhs, IntType Divisor)
 
static TIntPoint DivideAndRoundDown (TIntPoint lhs, TIntPoint Divisor)
 
static int32 Num ()
 

Public Attributes

union { 
 
   struct { 
 
      IntType   X 
 
      IntType   Y 
 
   }  
 
   IntType   XY [2] 
 
};  
 

Static Public Attributes

static const TIntPoint ZeroValue
 
static const TIntPoint NoneValue
 

Friends

FArchiveoperator<< (FArchive &Ar, TIntPoint &Point)
 
void operator<< (FStructuredArchive::FSlot Slot, TIntPoint &Point)
 

Detailed Description

template<typename InIntType>
struct UE::Math::TIntPoint< InIntType >

Structure for integer points in 2-d space.

Member Typedef Documentation

◆ IntType

template<typename InIntType >
using UE::Math::TIntPoint< InIntType >::IntType = InIntType

Constructor & Destructor Documentation

◆ TIntPoint() [1/7]

template<typename InIntType >
UE::Math::TIntPoint< InIntType >::TIntPoint ( )
default

Default constructor (no initialization).

◆ TIntPoint() [2/7]

template<typename InIntType >
UE::Math::TIntPoint< InIntType >::TIntPoint ( IntType  InX,
IntType  InY 
)
inline

Create and initialize a new instance with the specified coordinates.

Parameters
InXThe x-coordinate.
InYThe y-coordinate.

◆ TIntPoint() [3/7]

template<typename InIntType >
UE::Math::TIntPoint< InIntType >::TIntPoint ( IntType  InXY)
inline

Create and initialize a new instance with a single int. Both X and Y will be initialized to this value

Parameters
InXYThe x and y-coordinate.

◆ TIntPoint() [4/7]

template<typename InIntType >
UE::Math::TIntPoint< InIntType >::TIntPoint ( EForceInit  )
inlineexplicit

Create and initialize a new instance to zero.

Parameters
EForceInitForce init enum

◆ TIntPoint() [5/7]

template<typename InIntType >
template<typename OtherIntType >
UE::Math::TIntPoint< InIntType >::TIntPoint ( TIntPoint< OtherIntType Other)
inlineexplicit

Converts to another int type. Checks that the cast will succeed.

◆ TIntPoint() [6/7]

◆ TIntPoint() [7/7]

template<typename InIntType >
UE::Math::TIntPoint< InIntType >::TIntPoint ( const TIntPoint< InIntType > &  )
default

Member Function Documentation

◆ ComponentMax()

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::ComponentMax ( const TIntPoint< InIntType > &  Other) const
inline

Get the component-wise max of two points.

See also
ComponentMin, GetMin

◆ ComponentMin()

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::ComponentMin ( const TIntPoint< InIntType > &  Other) const
inline

Get the component-wise min of two points.

See also
ComponentMax, GetMax

◆ DivideAndRoundDown() [1/2]

template<typename InIntType >
static TIntPoint UE::Math::TIntPoint< InIntType >::DivideAndRoundDown ( TIntPoint< InIntType lhs,
IntType  Divisor 
)
inlinestatic

Divide an int point and round down the result.

Parameters
lhsThe int point being divided.
DivisorWhat to divide the int point by.
Returns
A new divided int point.
See also
DivideAndRoundUp

◆ DivideAndRoundDown() [2/2]

template<typename InIntType >
static TIntPoint UE::Math::TIntPoint< InIntType >::DivideAndRoundDown ( TIntPoint< InIntType lhs,
TIntPoint< InIntType Divisor 
)
inlinestatic

◆ DivideAndRoundUp() [1/2]

template<typename InIntType >
static TIntPoint UE::Math::TIntPoint< InIntType >::DivideAndRoundUp ( TIntPoint< InIntType lhs,
IntType  Divisor 
)
inlinestatic

Divide an int point and round up the result.

Parameters
lhsThe int point being divided.
DivisorWhat to divide the int point by.
Returns
A new divided int point.
See also
DivideAndRoundDown

◆ DivideAndRoundUp() [2/2]

template<typename InIntType >
static TIntPoint UE::Math::TIntPoint< InIntType >::DivideAndRoundUp ( TIntPoint< InIntType lhs,
TIntPoint< InIntType Divisor 
)
inlinestatic

◆ GetMax()

template<typename InIntType >
IntType UE::Math::TIntPoint< InIntType >::GetMax ( ) const
inline

Get the larger of the point's two components.

Returns
The maximum component of the point.
See also
GetMin, Size, SizeSquared

◆ GetMin()

template<typename InIntType >
IntType UE::Math::TIntPoint< InIntType >::GetMin ( ) const
inline

Get the smaller of the point's two components.

Returns
The minimum component of the point.
See also
GetMax, Size, SizeSquared

◆ InitFromString()

template<typename InIntType >
bool UE::Math::TIntPoint< InIntType >::InitFromString ( const FString &  InSourceString)
inline

Initialize this FIntPoint based on an FString. The String is expected to contain X=, Y= The FIntPoint will be bogus when InitFromString returns false.

Parameters
InSourceStringFString containing the color values.
Returns
true if the X,Y values were read successfully; false otherwise.

◆ Num()

template<typename InIntType >
static int32 UE::Math::TIntPoint< InIntType >::Num ( )
inlinestatic

Get number of components point has.

Returns
number of components point has.

◆ operator!=()

template<typename InIntType >
bool UE::Math::TIntPoint< InIntType >::operator!= ( const TIntPoint< InIntType > &  Other) const
inline

Compare two points for inequality.

Parameters
OtherThe other int point being compared.
Returns
true if the points are not equal, false otherwise.

◆ operator()() [1/2]

template<typename InIntType >
IntType & UE::Math::TIntPoint< InIntType >::operator() ( int32  PointIndex)
inline

Get specific component of a point.

Parameters
PointIndexIndex of point component
Returns
reference to component.

◆ operator()() [2/2]

template<typename InIntType >
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntType & UE::Math::TIntPoint< InIntType >::operator() ( int32  PointIndex) const
inline

Get specific component of a point.

Parameters
PointIndexIndex of point component.
Returns
const reference to component.

◆ operator*() [1/2]

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::operator* ( const TIntPoint< InIntType > &  Other) const
inline

Get the result of multiplication on this point.

Parameters
OtherThe point to multiply with this point.
Returns
A new multiplied int point

◆ operator*() [2/2]

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::operator* ( IntType  Scale) const
inline

Get the result of scaling on this point.

Parameters
ScaleWhat to multiply the point by.
Returns
A new scaled int point.

◆ operator*=() [1/2]

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator*= ( const TIntPoint< InIntType > &  Other)
inline

Multiply another point component-wise from this point.

Parameters
OtherThe point to multiply with this point.
Returns
Reference to this point after multiplication.

◆ operator*=() [2/2]

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator*= ( IntType  Scale)
inline

Scale this point.

Parameters
ScaleWhat to multiply the point by.
Returns
Reference to this point after multiplication.

◆ operator+()

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::operator+ ( const TIntPoint< InIntType > &  Other) const
inline

Get the result of addition on this point.

Parameters
OtherThe other point to add to this.
Returns
A new combined int point.

◆ operator+=()

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator+= ( const TIntPoint< InIntType > &  Other)
inline

Add another point component-wise to this point.

Parameters
OtherThe point to add to this point.
Returns
Reference to this point after addition.

◆ operator-()

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::operator- ( const TIntPoint< InIntType > &  Other) const
inline

Get the result of subtraction from this point.

Parameters
OtherThe other point to subtract from this.
Returns
A new subtracted int point.

◆ operator-=()

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator-= ( const TIntPoint< InIntType > &  Other)
inline

Subtract another point component-wise from this point.

Parameters
OtherThe point to subtract from this point.
Returns
Reference to this point after subtraction.

◆ operator/() [1/2]

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::operator/ ( const TIntPoint< InIntType > &  Other) const
inline

Get the result of division on this point.

Parameters
OtherThe other point to subtract from this.
Returns
A new subtracted int point.

◆ operator/() [2/2]

template<typename InIntType >
TIntPoint UE::Math::TIntPoint< InIntType >::operator/ ( IntType  Divisor) const
inline

Get the result of division on this point.

Parameters
DivisorWhat to divide the point by.
Returns
A new divided int point.

◆ operator/=() [1/2]

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator/= ( const TIntPoint< InIntType > &  Other)
inline

Divide this point component-wise by another point.

Parameters
OtherThe point to divide with.
Returns
Reference to this point after division.

◆ operator/=() [2/2]

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator/= ( IntType  Divisor)
inline

Divide this point by a scalar.

Parameters
DivisorWhat to divide the point by.
Returns
Reference to this point after division.

◆ operator=() [1/2]

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator= ( const TIntPoint< InIntType > &  )
default

◆ operator=() [2/2]

template<typename InIntType >
TIntPoint & UE::Math::TIntPoint< InIntType >::operator= ( TIntPoint< InIntType > &&  )
default

◆ operator==()

template<typename InIntType >
bool UE::Math::TIntPoint< InIntType >::operator== ( const TIntPoint< InIntType > &  Other) const
inline

Compare two points for equality.

Parameters
OtherThe other int point being compared.
Returns
true if the points are equal, false otherwise.

◆ operator[]() [1/2]

template<typename InIntType >
IntType & UE::Math::TIntPoint< InIntType >::operator[] ( IntType  Index)
inline

Get specific component of the point.

Parameters
Indexthe index of point component
Returns
reference to component.

◆ operator[]() [2/2]

template<typename InIntType >
IntType UE::Math::TIntPoint< InIntType >::operator[] ( IntType  Index) const
inline

Get specific component of the point.

Parameters
Indexthe index of point component
Returns
copy of component value.

◆ Serialize()

template<typename InIntType >
bool UE::Math::TIntPoint< InIntType >::Serialize ( FArchive Ar)
inline

Serialize the point.

Parameters
ArThe archive to serialize into.
Returns
true on success, false otherwise.

◆ SerializeFromMismatchedTag()

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

◆ Size()

template<typename InIntType >
IntType UE::Math::TIntPoint< InIntType >::Size ( ) const
inline

Get the distance of this point from (0,0).

Returns
The distance of this point from (0,0).
See also
GetMax, GetMin, SizeSquared

◆ SizeSquared()

template<typename InIntType >
IntType UE::Math::TIntPoint< InIntType >::SizeSquared ( ) const
inline

Get the squared distance of this point from (0,0).

Returns
The squared distance of this point from (0,0).
See also
GetMax, GetMin, Size

◆ ToString() [1/9]

template<typename InIntType >
FString UE::Math::TIntPoint< InIntType >::ToString ( ) const
inline

Get a textual representation of this point.

Returns
A string describing the point.

◆ ToString() [2/9]

FString UE::Math::TIntPoint< int64 >::ToString ( ) const
inline

◆ ToString() [3/9]

FString UE::Math::TIntPoint< int32 >::ToString ( ) const
inline

◆ ToString() [4/9]

FString UE::Math::TIntPoint< int16 >::ToString ( ) const
inline

◆ ToString() [5/9]

FString UE::Math::TIntPoint< int8 >::ToString ( ) const
inline

◆ ToString() [6/9]

FString UE::Math::TIntPoint< uint64 >::ToString ( ) const
inline

◆ ToString() [7/9]

FString UE::Math::TIntPoint< uint32 >::ToString ( ) const
inline

◆ ToString() [8/9]

FString UE::Math::TIntPoint< uint16 >::ToString ( ) const
inline

◆ ToString() [9/9]

FString UE::Math::TIntPoint< uint8 >::ToString ( ) const
inline

Friends And Related Symbol Documentation

◆ operator<< [1/2]

template<typename InIntType >
FArchive & operator<< ( FArchive Ar,
TIntPoint< InIntType > &  Point 
)
friend

Serialize the point.

Parameters
ArThe archive to serialize into.
PointThe point to serialize.
Returns
Reference to the Archive after serialization.

◆ operator<< [2/2]

template<typename InIntType >
void operator<< ( FStructuredArchive::FSlot  Slot,
TIntPoint< InIntType > &  Point 
)
friend

Serialize the point.

Parameters
SlotThe structured archive slot to serialize into.
PointThe point to serialize.

Member Data Documentation

◆ [union]

union { ... } UE::Math::TIntPoint< InIntType >

◆ NoneValue

template<typename IntType >
const TIntPoint< IntType > UE::Math::TIntPoint< IntType >::NoneValue
static

An integer point with INDEX_NONE values.

◆ X

Holds the point's x-coordinate.

◆ XY

◆ Y

Holds the point's y-coordinate.

◆ ZeroValue

template<typename IntType >
const TIntPoint< IntType > UE::Math::TIntPoint< IntType >::ZeroValue
static

An integer point with zeroed values.


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