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

#include <IntVector.h>

Public Types

using IntType = InIntType
 

Public Member Functions

 TIntVector3 ()=default
 
 TIntVector3 (IntType InX, IntType InY, IntType InZ)
 
 TIntVector3 (IntType InValue)
 
 TIntVector3 (TIntVector4< IntType > Other)
 
template<typename FloatType >
 TIntVector3 (TVector< FloatType > InVector)
 
 TIntVector3 (EForceInit)
 
template<typename OtherIntType >
 TIntVector3 (TIntVector3< OtherIntType > Other)
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS TIntVector3 (TIntVector3 &&)=default
 
 TIntVector3 (const TIntVector3 &)=default
 
TIntVector3operator= (TIntVector3 &&)=default
 
TIntVector3operator= (const TIntVector3 &)=default
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntTypeoperator() (int32 ComponentIndex) const
 
IntTypeoperator() (int32 ComponentIndex)
 
const IntTypeoperator[] (int32 ComponentIndex) const
 
IntTypeoperator[] (int32 ComponentIndex)
 
bool operator== (const TIntVector3 &Other) const
 
bool operator!= (const TIntVector3 &Other) const
 
TIntVector3operator*= (const TIntVector3 &Other)
 
TIntVector3operator*= (IntType Scale)
 
TIntVector3operator/= (IntType Divisor)
 
TIntVector3operator%= (IntType Divisor)
 
TIntVector3operator+= (const TIntVector3 &Other)
 
TIntVector3operator-= (const TIntVector3 &Other)
 
TIntVector3 operator* (const TIntVector3 &Other) const
 
TIntVector3 operator* (IntType Scale) const
 
TIntVector3 operator/ (IntType Divisor) const
 
TIntVector3 operator% (IntType Divisor) const
 
TIntVector3 operator+ (const TIntVector3 &Other) const
 
TIntVector3 operator- (const TIntVector3 &Other) const
 
TIntVector3 operator>> (IntType Shift) const
 
TIntVector3 operator<< (IntType Shift) const
 
TIntVector3 operator& (IntType Value) const
 
TIntVector3 operator| (IntType Value) const
 
TIntVector3 operator^ (IntType Value) const
 
bool IsZero () const
 
IntType GetMax () const
 
IntType GetAbsMax () const
 
IntType GetMin () const
 
IntType GetAbsMin () const
 
TIntVector3 ComponentMax (const TIntVector3 &Other) const
 
TIntVector3 ComponentMin (const TIntVector3 &Other) const
 
IntType Size () 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 TIntVector3 DivideAndRoundUp (TIntVector3 Lhs, IntType Divisor)
 
static TIntVector3 DivideAndRoundUp (TIntVector3 Lhs, TIntVector3 Divisor)
 
static int32 Num ()
 

Public Attributes

union { 
 
   struct { 
 
      IntType   X 
 
      IntType   Y 
 
      IntType   Z 
 
   }  
 
   IntType   XYZ [3] 
 
};  
 

Static Public Attributes

static const TIntVector3 ZeroValue
 
static const TIntVector3 NoneValue
 

Friends

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

Detailed Description

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

Structure for integer vectors in 3-d space.

Member Typedef Documentation

◆ IntType

Constructor & Destructor Documentation

◆ TIntVector3() [1/9]

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

Default constructor (no initialization).

◆ TIntVector3() [2/9]

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

Creates and initializes a new instance with the specified coordinates.

Parameters
InXThe x-coordinate.
InYThe y-coordinate.
InZThe z-coordinate.

◆ TIntVector3() [3/9]

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

Constructor

Parameters
InValuereplicated to all components

◆ TIntVector3() [4/9]

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

◆ TIntVector3() [5/9]

template<typename InIntType >
template<typename FloatType >
UE::Math::TIntVector3< InIntType >::TIntVector3 ( TVector< FloatType >  InVector)
explicit

Constructor

Parameters
InVectorfloat vector converted to int

◆ TIntVector3() [6/9]

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

Constructor

Parameters
EForceInitForce init enum

◆ TIntVector3() [7/9]

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

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

◆ TIntVector3() [8/9]

◆ TIntVector3() [9/9]

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

Member Function Documentation

◆ AppendString() [1/2]

template<typename InIntType >
void UE::Math::TIntVector3< 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::TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< InIntType >::ComponentMax ( const TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< InIntType >::ComponentMin ( const TIntVector3< 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 TIntVector3 UE::Math::TIntVector3< InIntType >::DivideAndRoundUp ( TIntVector3< 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 TIntVector3 UE::Math::TIntVector3< InIntType >::DivideAndRoundUp ( TIntVector3< InIntType Lhs,
TIntVector3< InIntType Divisor 
)
inlinestatic

◆ GetAbsMax()

template<typename InIntType >
IntType UE::Math::TIntVector3< 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::TIntVector3< 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::TIntVector3< 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::TIntVector3< 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::TIntVector3< InIntType >::InitFromString ( const FString &  InSourceString)
inline

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

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

◆ IsZero()

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

Is vector equal to zero.

Returns
is zero

◆ Num()

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

Gets the number of components a vector has.

Returns
Number of components vector has.

◆ operator!=()

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

Compares vectors for inequality.

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

◆ operator%()

template<typename InIntType >
TIntVector3 UE::Math::TIntVector3< 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 >
TIntVector3 & UE::Math::TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< 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 >
IntType & UE::Math::TIntVector3< InIntType >::operator() ( int32  ComponentIndex)
inline

Gets specific component of a vector.

Parameters
ComponentIndexIndex of vector component.
Returns
reference to component.

◆ operator()() [2/2]

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

Gets specific component of a vector.

Parameters
ComponentIndexIndex of vector component.
Returns
const reference to component.

◆ operator*() [1/2]

template<typename InIntType >
TIntVector3 UE::Math::TIntVector3< InIntType >::operator* ( const TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< 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 >
TIntVector3 & UE::Math::TIntVector3< InIntType >::operator*= ( const TIntVector3< 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 >
TIntVector3 & UE::Math::TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< InIntType >::operator+ ( const TIntVector3< 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 >
TIntVector3 & UE::Math::TIntVector3< InIntType >::operator+= ( const TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< InIntType >::operator- ( const TIntVector3< 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 >
TIntVector3 & UE::Math::TIntVector3< InIntType >::operator-= ( const TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< 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 >
TIntVector3 & UE::Math::TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< 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 >
TIntVector3 & UE::Math::TIntVector3< InIntType >::operator= ( const TIntVector3< InIntType > &  )
default

◆ operator=() [2/2]

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

◆ operator==()

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

Compares vectors for equality.

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

◆ operator>>()

template<typename InIntType >
TIntVector3 UE::Math::TIntVector3< 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::TIntVector3< InIntType >::operator[] ( int32  ComponentIndex)
inline

Gets specific component of a vector.

Parameters
ComponentIndexIndex of vector component.
Returns
reference to component.

◆ operator[]() [2/2]

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

Gets specific component of a vector.

Parameters
ComponentIndexIndex of vector component.
Returns
const reference to component.

◆ operator^()

template<typename InIntType >
TIntVector3 UE::Math::TIntVector3< 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 >
TIntVector3 UE::Math::TIntVector3< 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::TIntVector3< InIntType >::Serialize ( FArchive Ar)
inline

◆ SerializeFromMismatchedTag()

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

◆ Size()

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

Gets the distance of this vector from (0,0,0).

Returns
The distance of this vector from (0,0,0).

◆ ToString()

template<typename InIntType >
FString UE::Math::TIntVector3< 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,
TIntVector3< InIntType > &  Vector 
)
friend

Serializes the Vector3.

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,
TIntVector3< InIntType > &  Vector 
)
friend

◆ operator<< [3/3]

template<typename InIntType >
template<typename CharType >
TStringBuilderBase< CharType > & operator<< ( TStringBuilderBase< CharType > &  Builder,
const TIntVector3< 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::TIntVector3< InIntType >

◆ NoneValue

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

An int vector with INDEX_NONE values.

◆ X

Holds the vector's x-coordinate.

◆ XYZ

◆ Y

Holds the vector's y-coordinate.

◆ Z

Holds the vector's z-coordinate.

◆ ZeroValue

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

An int vector with zeroed values.


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