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

#include <IntVector.h>

Public Types

using IntType = InIntType
 

Public Member Functions

 TIntVector2 ()=default
 
 TIntVector2 (IntType InX, IntType InY)
 
 TIntVector2 (IntType InValue)
 
 TIntVector2 (EForceInit)
 
 TIntVector2 (TIntPoint< IntType > Other)
 
 TIntVector2 (TIntVector3< IntType > Other)
 
template<typename OtherIntType >
 TIntVector2 (TIntVector2< OtherIntType > Other)
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS TIntVector2 (TIntVector2 &&)=default
 
 TIntVector2 (const TIntVector2 &)=default
 
TIntVector2operator= (TIntVector2 &&)=default
 
TIntVector2operator= (const TIntVector2 &)=default
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntTypeoperator[] (int32 ComponentIndex) const
 
IntTypeoperator[] (int32 ComponentIndex)
 
bool operator== (const TIntVector2 &Other) const
 
bool operator!= (const TIntVector2 &Other) const
 
TIntVector2operator*= (const TIntVector2 &Other)
 
TIntVector2operator*= (IntType Scale)
 
TIntVector2operator/= (IntType Divisor)
 
TIntVector2operator%= (IntType Divisor)
 
TIntVector2operator+= (const TIntVector2 &Other)
 
TIntVector2operator-= (const TIntVector2 &Other)
 
TIntVector2 operator* (const TIntVector2 &Other) const
 
TIntVector2 operator* (IntType Scale) const
 
TIntVector2 operator/ (IntType Divisor) const
 
TIntVector2 operator% (IntType Divisor) const
 
TIntVector2 operator+ (const TIntVector2 &Other) const
 
TIntVector2 operator- (const TIntVector2 &Other) const
 
TIntVector2 operator>> (IntType Shift) const
 
TIntVector2 operator<< (IntType Shift) const
 
TIntVector2 operator& (IntType Value) const
 
TIntVector2 operator| (IntType Value) const
 
TIntVector2 operator^ (IntType Value) const
 
bool IsZero () const
 
IntType GetMax () const
 
IntType GetAbsMax () const
 
IntType GetMin () const
 
IntType GetAbsMin () const
 
TIntVector2 ComponentMax (const TIntVector2 &Other) const
 
TIntVector2 ComponentMin (const TIntVector2 &Other) const
 
template<typename CharType >
void AppendString (TStringBuilderBase< CharType > &Out) const
 
void AppendString (FString &Out) const
 
FString ToString () const
 
bool InitFromString (const FString &InSourceString)
 
bool Serialize (FArchive &Ar)
 
bool SerializeFromMismatchedTag (FName StructTag, FArchive &Ar)
 

Static Public Member Functions

static TIntVector2 DivideAndRoundUp (TIntVector2 Lhs, IntType Divisor)
 
static TIntVector2 DivideAndRoundUp (TIntVector2 Lhs, TIntVector2 Divisor)
 
static int32 Num ()
 

Public Attributes

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

Static Public Attributes

static const TIntVector2 ZeroValue
 
static const TIntVector2 NoneValue
 

Friends

template<typename CharType >
TStringBuilderBase< CharType > & operator<< (TStringBuilderBase< CharType > &Builder, const TIntVector2 &Vector)
 
FArchiveoperator<< (FArchive &Ar, TIntVector2 &Vector)
 
void operator<< (FStructuredArchive::FSlot Slot, TIntVector2 &Vector)
 

Member Typedef Documentation

◆ IntType

Constructor & Destructor Documentation

◆ TIntVector2() [1/9]

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

◆ TIntVector2() [2/9]

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

◆ TIntVector2() [3/9]

template<typename InIntType >
UE::Math::TIntVector2< InIntType >::TIntVector2 ( IntType  InValue)
inlineexplicit

◆ TIntVector2() [4/9]

template<typename InIntType >
UE::Math::TIntVector2< InIntType >::TIntVector2 ( EForceInit  )
inline

◆ TIntVector2() [5/9]

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

◆ TIntVector2() [6/9]

template<typename InIntType >
UE::Math::TIntVector2< InIntType >::TIntVector2 ( TIntVector3< IntType Other)
inlineexplicit

◆ TIntVector2() [7/9]

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

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

◆ TIntVector2() [8/9]

◆ TIntVector2() [9/9]

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

Member Function Documentation

◆ AppendString() [1/2]

template<typename InIntType >
void UE::Math::TIntVector2< InIntType >::AppendString ( FString &  Out) const
inline

Appends a textual representation of this vector to the output string.

Parameters
OutThe string to append to.

◆ AppendString() [2/2]

template<typename InIntType >
template<typename CharType >
void UE::Math::TIntVector2< InIntType >::AppendString ( TStringBuilderBase< CharType > &  Out) const
inline

Appends a textual representation of this vector to the output string builder.

Parameters
OutThe string builder to append to.

◆ ComponentMax()

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

Get the component-wise max of this vector and the parameter vector.

Parameters
OtherThe other vector to compare against.
Returns
A vector where each component is the maximum value of the corresponding components of the two vectors.

◆ ComponentMin()

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

Get the component-wise min of this vector and the parameter vector.

Parameters
OtherThe other vector to compare against.
Returns
A vector where each component is the minimum value of the corresponding components of the two vectors.

◆ DivideAndRoundUp() [1/2]

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

Divide an int vector and round up the result.

Parameters
LhsThe int vector being divided.
DivisorWhat to divide the int vector by.
Returns
A new divided int vector.

◆ DivideAndRoundUp() [2/2]

template<typename InIntType >
static TIntVector2 UE::Math::TIntVector2< InIntType >::DivideAndRoundUp ( TIntVector2< InIntType Lhs,
TIntVector2< InIntType Divisor 
)
inlinestatic

◆ GetAbsMax()

template<typename InIntType >
IntType UE::Math::TIntVector2< InIntType >::GetAbsMax ( ) const
inline

Get the maximum absolute value in the vector.

Returns
The maximum absolute value in the vector.

◆ GetAbsMin()

template<typename InIntType >
IntType UE::Math::TIntVector2< InIntType >::GetAbsMin ( ) const
inline

Get the minimum absolute value in the vector.

Returns
The minimum absolute value in the vector.

◆ GetMax()

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

Gets the maximum value in the vector.

Returns
The maximum value in the vector.

◆ GetMin()

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

Gets the minimum value in the vector.

Returns
The minimum value in the vector.

◆ InitFromString()

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

Initialize this FIntVector based on an FString. The String is expected to contain X=, Y= The FIntVector 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.

◆ IsZero()

template<typename InIntType >
bool UE::Math::TIntVector2< InIntType >::IsZero ( ) const
inline

Is vector equal to zero.

Returns
is zero

◆ Num()

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

Gets the number of components a vector has.

Returns
Number of components vector has.

◆ operator!=()

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

◆ operator%()

template<typename InIntType >
TIntVector2 UE::Math::TIntVector2< InIntType >::operator% ( IntType  Divisor) const
inline

Gets the remainder of division on this vector.

Parameters
DivisorWhat to divide the vector by.
Returns
A new remainder int vector.

◆ operator%=()

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

Remainder of division of this vector.

Parameters
DivisorWhat to divide the vector by.
Returns
Reference to this vector after remainder.

◆ operator&()

template<typename InIntType >
TIntVector2 UE::Math::TIntVector2< InIntType >::operator& ( IntType  Value) const
inline

Component-wise AND.

Parameters
ValueNumber to AND with the each component.
Returns
A new shifted int vector.

◆ operator*() [1/2]

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

Gets the result of component-wise multiplication of this vector by another.

Parameters
OtherThe vector to multiply with.
Returns
The result of multiplication.

◆ operator*() [2/2]

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

Gets the result of scaling on this vector.

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

◆ operator*=() [1/2]

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

Multiplies this vector with another vector, using component-wise multiplication.

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

◆ operator*=() [2/2]

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

Scales this vector.

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

◆ operator+()

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

Gets the result of addition on this vector.

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

◆ operator+=()

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

Adds to this vector.

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

◆ operator-()

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

Gets the result of subtraction from this vector.

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

◆ operator-=()

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

Subtracts from this vector.

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

◆ operator/()

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

Gets the result of division on this vector.

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

◆ operator/=()

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

Divides this vector.

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

◆ operator<<()

template<typename InIntType >
TIntVector2 UE::Math::TIntVector2< InIntType >::operator<< ( IntType  Shift) const
inline

Shifts all components to the left.

Parameters
ShiftThe number of bits to shift.
Returns
A new shifted int vector.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

◆ operator>>()

template<typename InIntType >
TIntVector2 UE::Math::TIntVector2< InIntType >::operator>> ( IntType  Shift) const
inline

Shifts all components to the right.

Parameters
ShiftThe number of bits to shift.
Returns
A new shifted int vector.

◆ operator[]() [1/2]

template<typename InIntType >
IntType & UE::Math::TIntVector2< InIntType >::operator[] ( int32  ComponentIndex)
inline

◆ operator[]() [2/2]

template<typename InIntType >
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntType & UE::Math::TIntVector2< InIntType >::operator[] ( int32  ComponentIndex) const
inline

◆ operator^()

template<typename InIntType >
TIntVector2 UE::Math::TIntVector2< InIntType >::operator^ ( IntType  Value) const
inline

Component-wise XOR.

Parameters
ValueNumber to XOR with the each component.
Returns
A new shifted int vector.

◆ operator|()

template<typename InIntType >
TIntVector2 UE::Math::TIntVector2< InIntType >::operator| ( IntType  Value) const
inline

Component-wise OR.

Parameters
ValueNumber to OR with the each component.
Returns
A new shifted int vector.

◆ Serialize()

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

◆ SerializeFromMismatchedTag()

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

◆ ToString()

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

Get a textual representation of this vector.

Returns
A string describing the vector.

Friends And Related Symbol Documentation

◆ operator<< [1/3]

template<typename InIntType >
FArchive & operator<< ( FArchive Ar,
TIntVector2< InIntType > &  Vector 
)
friend

Serializes the Vector2.

Parameters
ArThe archive to serialize into.
VectorThe vector to serialize.
Returns
Reference to the Archive after serialization.

◆ operator<< [2/3]

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

◆ operator<< [3/3]

template<typename InIntType >
template<typename CharType >
TStringBuilderBase< CharType > & operator<< ( TStringBuilderBase< CharType > &  Builder,
const TIntVector2< InIntType > &  Vector 
)
friend

Appends a textual representation of the parameter vector to the output string builder.

Parameters
BuilderThe string builder to append to.
VectorThe vector to append.

Member Data Documentation

◆ [union]

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

◆ NoneValue

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

An int vector with INDEX_NONE values.

◆ X

Holds the vector's x-coordinate.

◆ XY

◆ Y

Holds the vector's y-coordinate.

◆ ZeroValue

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

An int vector with zeroed values.


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