Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
FIntPoint Struct Reference

#include <IntPoint.h>

+ Collaboration diagram for FIntPoint:

Public Member Functions

 FIntPoint ()
 
 FIntPoint (int32 InX, int32 InY)
 
FORCEINLINE FIntPoint (EForceInit)
 
const int32operator() (int32 PointIndex) const
 
int32operator() (int32 PointIndex)
 
bool operator== (const FIntPoint &Other) const
 
bool operator!= (const FIntPoint &Other) const
 
FIntPointoperator*= (int32 Scale)
 
FIntPointoperator/= (int32 Divisor)
 
FIntPointoperator+= (const FIntPoint &Other)
 
FIntPointoperator-= (const FIntPoint &Other)
 
FIntPointoperator/= (const FIntPoint &Other)
 
FIntPointoperator= (const FIntPoint &Other)
 
FIntPoint operator* (int32 Scale) const
 
FIntPoint operator/ (int32 Divisor) const
 
FIntPoint operator+ (const FIntPoint &Other) const
 
FIntPoint operator- (const FIntPoint &Other) const
 
FIntPoint operator/ (const FIntPoint &Other) const
 
int32operator[] (int32 Index)
 
int32 operator[] (int32 Index) const
 
FORCEINLINE FIntPoint ComponentMin (const FIntPoint &Other) const
 
FORCEINLINE FIntPoint ComponentMax (const FIntPoint &Other) const
 
int32 GetMax () const
 
int32 GetMin () const
 
int32 Size () const
 
int32 SizeSquared () const
 
FString ToString () const
 

Static Public Member Functions

static FIntPoint DivideAndRoundUp (FIntPoint lhs, int32 Divisor)
 
static FIntPoint DivideAndRoundUp (FIntPoint lhs, FIntPoint Divisor)
 
static FIntPoint DivideAndRoundDown (FIntPoint lhs, int32 Divisor)
 
static int32 Num ()
 

Public Attributes

int32 X
 
int32 Y
 

Static Public Attributes

static const FIntPoint ZeroValue
 
static const FIntPoint NoneValue
 

Detailed Description

Structure for integer points in 2-d space.

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

Definition at line 14 of file IntPoint.h.

Constructor & Destructor Documentation

◆ FIntPoint() [1/3]

FORCEINLINE FIntPoint::FIntPoint ( )

Default constructor (no initialization).

Definition at line 278 of file IntPoint.h.

◆ FIntPoint() [2/3]

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

Create and initialize a new instance with the specified coordinates.

Parameters
InXThe x-coordinate.
InYThe y-coordinate.

Definition at line 281 of file IntPoint.h.

+ Here is the caller graph for this function:

◆ FIntPoint() [3/3]

FORCEINLINE FIntPoint::FIntPoint ( EForceInit )
explicit

Create and initialize a new instance to zero.

Parameters
EForceInitForce init enum

Definition at line 287 of file IntPoint.h.

Member Function Documentation

◆ ComponentMax()

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

Get the component-wise max of two points.

See also
ComponentMin, GetMin

Definition at line 409 of file IntPoint.h.

+ Here is the call graph for this function:

◆ ComponentMin()

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

Get the component-wise min of two points.

See also
ComponentMax, GetMax

Definition at line 403 of file IntPoint.h.

+ Here is the call graph for this function:

◆ DivideAndRoundDown()

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

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

Definition at line 424 of file IntPoint.h.

+ Here is the call graph for this function:

◆ DivideAndRoundUp() [1/2]

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

Definition at line 419 of file IntPoint.h.

+ Here is the call graph for this function:

◆ DivideAndRoundUp() [2/2]

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

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

Definition at line 414 of file IntPoint.h.

+ Here is the call graph for this function:

◆ GetMax()

FORCEINLINE int32 FIntPoint::GetMax ( ) const

Get the larger of the point's two components.

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

Definition at line 448 of file IntPoint.h.

+ Here is the call graph for this function:

◆ GetMin()

FORCEINLINE int32 FIntPoint::GetMin ( ) const

Get the smaller of the point's two components.

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

Definition at line 454 of file IntPoint.h.

+ Here is the call graph for this function:

◆ Num()

FORCEINLINE int32 FIntPoint::Num ( )
static

Get number of components point has.

Returns
number of components point has.

Definition at line 305 of file IntPoint.h.

◆ operator!=()

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

Compare two points for inequality.

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

Definition at line 317 of file IntPoint.h.

◆ operator()() [1/2]

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

Get specific component of a point.

Parameters
PointIndexIndex of point component
Returns
reference to component.

Definition at line 299 of file IntPoint.h.

◆ operator()() [2/2]

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

Get specific component of a point.

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

Definition at line 293 of file IntPoint.h.

◆ operator*()

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

Get the result of scaling on this point.

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

Definition at line 377 of file IntPoint.h.

+ Here is the call graph for this function:

◆ operator*=()

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

Scale this point.

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

Definition at line 323 of file IntPoint.h.

+ Here is the caller graph for this function:

◆ operator+()

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

Get the result of addition on this point.

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

Definition at line 430 of file IntPoint.h.

+ Here is the call graph for this function:

◆ operator+=()

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

Add another point component-wise to this point.

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

Definition at line 341 of file IntPoint.h.

+ Here is the caller graph for this function:

◆ operator-()

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

Get the result of subtraction from this point.

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

Definition at line 436 of file IntPoint.h.

+ Here is the call graph for this function:

◆ operator-=()

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

Subtract another point component-wise from this point.

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

Definition at line 350 of file IntPoint.h.

+ Here is the caller graph for this function:

◆ operator/() [1/2]

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

Get the result of division on this point.

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

Definition at line 442 of file IntPoint.h.

+ Here is the call graph for this function:

◆ operator/() [2/2]

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

Get the result of division on this point.

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

Definition at line 383 of file IntPoint.h.

+ Here is the call graph for this function:

◆ operator/=() [1/2]

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

Divide this point component-wise by another point.

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

Definition at line 359 of file IntPoint.h.

+ Here is the caller graph for this function:

◆ operator/=() [2/2]

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

Divide this point by a scalar.

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

Definition at line 332 of file IntPoint.h.

+ Here is the caller graph for this function:

◆ operator=()

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

Assign another point to this one.

Parameters
OtherThe point to assign this point from.
Returns
Reference to this point after assignment.

Definition at line 368 of file IntPoint.h.

◆ operator==()

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

Compare two points for equality.

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

Definition at line 311 of file IntPoint.h.

◆ operator[]() [1/2]

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

Get specific component of the point.

Parameters
Indexthe index of point component
Returns
reference to component.

Definition at line 389 of file IntPoint.h.

◆ operator[]() [2/2]

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

Get specific component of the point.

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

Definition at line 396 of file IntPoint.h.

◆ Size()

FORCEINLINE int32 FIntPoint::Size ( ) const

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

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

Definition at line 460 of file IntPoint.h.

+ Here is the call graph for this function:

◆ SizeSquared()

FORCEINLINE int32 FIntPoint::SizeSquared ( ) const

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

Definition at line 467 of file IntPoint.h.

◆ ToString()

FString FIntPoint::ToString ( ) const

Get a textual representation of this point.

Returns
A string describing the point.

Member Data Documentation

◆ NoneValue

const FIntPoint FIntPoint::NoneValue
static

An integer point with INDEX_NONE values.

Definition at line 28 of file IntPoint.h.

◆ X

int32 FIntPoint::X

Holds the point's x-coordinate.

Definition at line 17 of file IntPoint.h.

◆ Y

int32 FIntPoint::Y

Holds the point's y-coordinate.

Definition at line 20 of file IntPoint.h.

◆ ZeroValue

const FIntPoint FIntPoint::ZeroValue
static

An integer point with zeroed values.

Definition at line 25 of file IntPoint.h.


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