engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 静态 Public 属性 | 友元 | 所有成员列表
FIntPoint结构体 参考

Structure for integer points in 2-d space. 更多...

#include <IntPoint.h>

Public 成员函数

FORCEINLINE FIntPoint ComponentMax (const FIntPoint &Other) const
 Get the component-wise max of two points. 更多...
 
FORCEINLINE FIntPoint ComponentMin (const FIntPoint &Other) const
 Get the component-wise min of two points. 更多...
 
 FIntPoint ()
 Default constructor (no initialization).
 
FORCEINLINE FIntPoint (EForceInit)
 Create and initialize a new instance to zero. 更多...
 
 FIntPoint (int32 InX, int32 InY)
 Create and initialize a new instance with the specified coordinates. 更多...
 
 FIntPoint (int32 InXY)
 Create and initialize a new instance with a single int. 更多...
 
int32 GetMax () const
 Get the larger of the point's two components. 更多...
 
int32 GetMin () const
 Get the smaller of the point's two components. 更多...
 
bool operator!= (const FIntPoint &Other) const
 Compare two points for inequality. 更多...
 
int32 & operator() (int32 PointIndex)
 Get specific component of a point. 更多...
 
const int32 & operator() (int32 PointIndex) const
 Get specific component of a point. 更多...
 
FIntPoint operator* (const FIntPoint &Other) const
 Get the result of multiplication on this point. 更多...
 
FIntPoint operator* (int32 Scale) const
 Get the result of scaling on this point. 更多...
 
FIntPoint & operator*= (const FIntPoint &Other)
 Multiply another point component-wise from this point. 更多...
 
FIntPoint & operator*= (int32 Scale)
 Scale this point. 更多...
 
FIntPoint operator+ (const FIntPoint &Other) const
 Get the result of addition on this point. 更多...
 
FIntPoint & operator+= (const FIntPoint &Other)
 Add another point component-wise to this point. 更多...
 
FIntPoint operator- (const FIntPoint &Other) const
 Get the result of subtraction from this point. 更多...
 
FIntPoint & operator-= (const FIntPoint &Other)
 Subtract another point component-wise from this point. 更多...
 
FIntPoint operator/ (const FIntPoint &Other) const
 Get the result of division on this point. 更多...
 
FIntPoint operator/ (int32 Divisor) const
 Get the result of division on this point. 更多...
 
FIntPoint & operator/= (const FIntPoint &Other)
 Divide this point component-wise by another point. 更多...
 
FIntPoint & operator/= (int32 Divisor)
 Divide this point by a scalar. 更多...
 
FIntPoint & operator= (const FIntPoint &Other)
 Assign another point to this one. 更多...
 
bool operator== (const FIntPoint &Other) const
 Compare two points for equality. 更多...
 
int32 & operator[] (int32 Index)
 Get specific component of the point. 更多...
 
int32 operator[] (int32 Index) const
 Get specific component of the point. 更多...
 
bool Serialize (FArchive &Ar)
 Serialize the point. 更多...
 
bool Serialize (FStructuredArchive::FSlot Slot)
 Serialize the point. 更多...
 
int32 Size () const
 Get the distance of this point from (0,0). 更多...
 
int32 SizeSquared () const
 Get the squared distance of this point from (0,0). 更多...
 
FString ToString () const
 Get a textual representation of this point. 更多...
 

静态 Public 成员函数

static FIntPoint DivideAndRoundDown (FIntPoint lhs, int32 Divisor)
 Divide an int point and round down the result. 更多...
 
static FIntPoint DivideAndRoundUp (FIntPoint lhs, int32 Divisor)
 Divide an int point and round up the result. 更多...
 
static int32 Num ()
 Get number of components point has. 更多...
 

Public 属性

int32 X
 Holds the point's x-coordinate.
 
int32 Y
 Holds the point's y-coordinate.
 

静态 Public 属性

static CORE_API const FIntPoint NoneValue
 An integer point with INDEX_NONE values.
 
static CORE_API const FIntPoint ZeroValue
 An integer point with zeroed values.
 

友元

FArchive & operator<< (FArchive &Ar, FIntPoint &Point)
 Serialize the point. 更多...
 
void operator<< (FStructuredArchive::FSlot Slot, FIntPoint &Point)
 Serialize the point. 更多...
 

详细描述

Structure for integer points in 2-d space.

待办事项:
Docs: The operators need better documentation, i.e. what does it mean to divide a point?

构造及析构函数说明

◆ FIntPoint() [1/3]

FORCEINLINE FIntPoint::FIntPoint ( int32  InX,
int32  InY 
)

Create and initialize a new instance with the specified coordinates.

参数
InXThe x-coordinate.
InYThe y-coordinate.

◆ FIntPoint() [2/3]

FORCEINLINE FIntPoint::FIntPoint ( int32  InXY)

Create and initialize a new instance with a single int.

Both X and Y will be initialized to this value

参数
InXYThe x and y-coordinate.

◆ FIntPoint() [3/3]

FORCEINLINE FIntPoint::FIntPoint ( EForceInit  )
explicit

Create and initialize a new instance to zero.

参数
EForceInitForce init enum

成员函数说明

◆ ComponentMax()

FORCEINLINE FIntPoint FIntPoint::ComponentMax ( const FIntPoint &  Other) const

Get the component-wise max of two points.

参见
ComponentMin, GetMin

◆ ComponentMin()

FORCEINLINE FIntPoint FIntPoint::ComponentMin ( const FIntPoint &  Other) const

Get the component-wise min of two points.

参见
ComponentMax, GetMax

◆ DivideAndRoundDown()

FORCEINLINE FIntPoint FIntPoint::DivideAndRoundDown ( FIntPoint  lhs,
int32  Divisor 
)
static

Divide an int point and round down the result.

参数
lhsThe int point being divided.
DivisorWhat to divide the int point by.
返回
A new divided int point.
参见
DivideAndRoundUp

◆ DivideAndRoundUp()

FORCEINLINE FIntPoint FIntPoint::DivideAndRoundUp ( FIntPoint  lhs,
int32  Divisor 
)
static

Divide an int point and round up the result.

参数
lhsThe int point being divided.
DivisorWhat to divide the int point by.
返回
A new divided int point.
参见
DivideAndRoundDown

◆ GetMax()

FORCEINLINE int32 FIntPoint::GetMax ( ) const

Get the larger of the point's two components.

返回
The maximum component of the point.
参见
GetMin, Size, SizeSquared

◆ GetMin()

FORCEINLINE int32 FIntPoint::GetMin ( ) const

Get the smaller of the point's two components.

返回
The minimum component of the point.
参见
GetMax, Size, SizeSquared

◆ Num()

FORCEINLINE int32 FIntPoint::Num ( )
static

Get number of components point has.

返回
number of components point has.

◆ operator!=()

FORCEINLINE bool FIntPoint::operator!= ( const FIntPoint &  Other) const

Compare two points for inequality.

参数
OtherThe other int point being compared.
返回
true if the points are not equal, false otherwise.

◆ operator()() [1/2]

FORCEINLINE int32 & FIntPoint::operator() ( int32  PointIndex)

Get specific component of a point.

参数
PointIndexIndex of point component
返回
reference to component.

◆ operator()() [2/2]

FORCEINLINE const int32 & FIntPoint::operator() ( int32  PointIndex) const

Get specific component of a point.

参数
PointIndexIndex of point component.
返回
const reference to component.

◆ operator*() [1/2]

FORCEINLINE FIntPoint FIntPoint::operator* ( const FIntPoint &  Other) const

Get the result of multiplication on this point.

参数
OtherThe point to multiply with this point.
返回
A new multiplied int point

◆ operator*() [2/2]

FORCEINLINE FIntPoint FIntPoint::operator* ( int32  Scale) const

Get the result of scaling on this point.

参数
ScaleWhat to multiply the point by.
返回
A new scaled int point.

◆ operator*=() [1/2]

FORCEINLINE FIntPoint & FIntPoint::operator*= ( const FIntPoint &  Other)

Multiply another point component-wise from this point.

参数
OtherThe point to multiply with this point.
返回
Reference to this point after multiplication.

◆ operator*=() [2/2]

FORCEINLINE FIntPoint & FIntPoint::operator*= ( int32  Scale)

Scale this point.

参数
ScaleWhat to multiply the point by.
返回
Reference to this point after multiplication.

◆ operator+()

FORCEINLINE FIntPoint FIntPoint::operator+ ( const FIntPoint &  Other) const

Get the result of addition on this point.

参数
OtherThe other point to add to this.
返回
A new combined int point.

◆ operator+=()

FORCEINLINE FIntPoint & FIntPoint::operator+= ( const FIntPoint &  Other)

Add another point component-wise to this point.

参数
OtherThe point to add to this point.
返回
Reference to this point after addition.

◆ operator-()

FORCEINLINE FIntPoint FIntPoint::operator- ( const FIntPoint &  Other) const

Get the result of subtraction from this point.

参数
OtherThe other point to subtract from this.
返回
A new subtracted int point.

◆ operator-=()

FORCEINLINE FIntPoint & FIntPoint::operator-= ( const FIntPoint &  Other)

Subtract another point component-wise from this point.

参数
OtherThe point to subtract from this point.
返回
Reference to this point after subtraction.

◆ operator/() [1/2]

FORCEINLINE FIntPoint FIntPoint::operator/ ( const FIntPoint &  Other) const

Get the result of division on this point.

参数
OtherThe other point to subtract from this.
返回
A new subtracted int point.

◆ operator/() [2/2]

FORCEINLINE FIntPoint FIntPoint::operator/ ( int32  Divisor) const

Get the result of division on this point.

参数
DivisorWhat to divide the point by.
返回
A new divided int point.

◆ operator/=() [1/2]

FORCEINLINE FIntPoint & FIntPoint::operator/= ( const FIntPoint &  Other)

Divide this point component-wise by another point.

参数
OtherThe point to divide with.
返回
Reference to this point after division.

◆ operator/=() [2/2]

FORCEINLINE FIntPoint & FIntPoint::operator/= ( int32  Divisor)

Divide this point by a scalar.

参数
DivisorWhat to divide the point by.
返回
Reference to this point after division.

◆ operator=()

FORCEINLINE FIntPoint & FIntPoint::operator= ( const FIntPoint &  Other)

Assign another point to this one.

参数
OtherThe point to assign this point from.
返回
Reference to this point after assignment.

◆ operator==()

FORCEINLINE bool FIntPoint::operator== ( const FIntPoint &  Other) const

Compare two points for equality.

参数
OtherThe other int point being compared.
返回
true if the points are equal, false otherwise.

◆ operator[]() [1/2]

FORCEINLINE int32 & FIntPoint::operator[] ( int32  Index)

Get specific component of the point.

参数
Indexthe index of point component
返回
reference to component.

◆ operator[]() [2/2]

FORCEINLINE int32 FIntPoint::operator[] ( int32  Index) const

Get specific component of the point.

参数
Indexthe index of point component
返回
copy of component value.

◆ Serialize() [1/2]

bool FIntPoint::Serialize ( FArchive &  Ar)
inline

Serialize the point.

参数
ArThe archive to serialize into.
返回
true on success, false otherwise.

◆ Serialize() [2/2]

bool FIntPoint::Serialize ( FStructuredArchive::FSlot  Slot)
inline

Serialize the point.

参数
SlotThe structured archive slot to serialize into.
返回
true on success, false otherwise.

◆ Size()

FORCEINLINE int32 FIntPoint::Size ( ) const

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

返回
The distance of this point from (0,0).
参见
GetMax, GetMin, SizeSquared

◆ SizeSquared()

FORCEINLINE int32 FIntPoint::SizeSquared ( ) const

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

返回
The squared distance of this point from (0,0).
参见
GetMax, GetMin, Size

◆ ToString()

FORCEINLINE FString FIntPoint::ToString ( ) const

Get a textual representation of this point.

返回
A string describing the point.

友元及相关函数文档

◆ operator<< [1/2]

FArchive & operator<< ( FArchive &  Ar,
FIntPoint &  Point 
)
friend

Serialize the point.

参数
ArThe archive to serialize into.
PointThe point to serialize.
返回
Reference to the Archive after serialization.

◆ operator<< [2/2]

void operator<< ( FStructuredArchive::FSlot  Slot,
FIntPoint &  Point 
)
friend

Serialize the point.

参数
SlotThe structured archive slot to serialize into.
PointThe point to serialize.

该结构体的文档由以下文件生成: