Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FFrameTime Struct Reference

#include <FrameTime.h>

+ Collaboration diagram for FFrameTime:

Public Member Functions

 FFrameTime ()
 
template<typename T , typename = typename TEnableIf<std::is_same_v<T, int32>>::Type>
 FFrameTime (T InFrameNumber)
 
 FFrameTime (FFrameNumber InFrameNumber)
 
 FFrameTime (FFrameNumber InFrameNumber, float InSubFrame)
 
FFrameTimeoperator= (FFrameNumber InFrameNumber)
 
FORCEINLINE FFrameNumber GetFrame () const
 
FORCEINLINE float GetSubFrame () const
 
FFrameNumber FloorToFrame () const
 
FFrameNumber CeilToFrame () const
 
FFrameNumber RoundToFrame () const
 
double AsDecimal () const
 

Static Public Member Functions

static FFrameTime FromDecimal (double InDecimalFrame)
 

Public Attributes

FFrameNumber FrameNumber
 

Static Public Attributes

static const float MaxSubframe
 

Private Attributes

float SubFrame
 

Friends

FORCEINLINE_DEBUGGABLE bool operator== (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE bool operator!= (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE bool operator> (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE bool operator>= (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE bool operator< (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE bool operator<= (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE FFrameTimeoperator+= (FFrameTime &LHS, FFrameTime RHS)
 
FORCEINLINE_DEBUGGABLE FFrameTime operator+ (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE FFrameTimeoperator-= (FFrameTime &LHS, FFrameTime RHS)
 
FORCEINLINE_DEBUGGABLE FFrameTime operator- (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE FFrameTime operator% (FFrameTime A, FFrameTime B)
 
FORCEINLINE_DEBUGGABLE FFrameTime operator- (FFrameTime A)
 
FORCEINLINE FFrameTime operator* (FFrameTime A, float Scalar)
 
FORCEINLINE FFrameTime operator* (float Scalar, FFrameTime A)
 
FORCEINLINE FFrameTime operator/ (FFrameTime A, float Scalar)
 

Detailed Description

Structure representing a time by a context-free frame number, plus a sub frame value in the range [0:1) Conversion to and from time in seconds is achieved in combination with FFrameRate. Only the frame number part of this representation can be negative, sub frames are always a positive value between the frame number and its next logical frame

Definition at line 15 of file FrameTime.h.

Constructor & Destructor Documentation

◆ FFrameTime() [1/4]

FFrameTime::FFrameTime ( )
inline

Default constructor initializing to zero

Definition at line 225 of file FrameTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FFrameTime() [2/4]

template<typename T , typename >
FFrameTime::FFrameTime ( T InFrameNumber)

Implicit construction from a single integer, while disallowing implicit conversion from any other numeric type

Definition at line 231 of file FrameTime.h.

◆ FFrameTime() [3/4]

FFrameTime::FFrameTime ( FFrameNumber InFrameNumber)
inline

Implicit construction from a type-safe frame number

Definition at line 236 of file FrameTime.h.

+ Here is the caller graph for this function:

◆ FFrameTime() [4/4]

FFrameTime::FFrameTime ( FFrameNumber InFrameNumber,
float InSubFrame )
inline

Construction from a frame number and a sub frame

Definition at line 241 of file FrameTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ AsDecimal()

FORCEINLINE_DEBUGGABLE double FFrameTime::AsDecimal ( ) const

Retrieve a decimal representation of this frame time Sub frames are always added to the current frame number, so for negative frame times, a time of -10 [sub frame 0.25] will yield a decimal value of -9.75.

Definition at line 276 of file FrameTime.h.

◆ CeilToFrame()

FORCEINLINE_DEBUGGABLE FFrameNumber FFrameTime::CeilToFrame ( ) const

Return the next frame number greater than or equal to this frame time

Definition at line 264 of file FrameTime.h.

◆ FloorToFrame()

FORCEINLINE_DEBUGGABLE FFrameNumber FFrameTime::FloorToFrame ( ) const

Return the first frame number less than or equal to this frame time

Definition at line 258 of file FrameTime.h.

+ Here is the caller graph for this function:

◆ FromDecimal()

FORCEINLINE_DEBUGGABLE FFrameTime FFrameTime::FromDecimal ( double InDecimalFrame)
static

Convert a decimal representation to a frame time Note that sub frames are always positive, so negative decimal representations result in an inverted sub frame and floored frame number

Definition at line 281 of file FrameTime.h.

+ Here is the call graph for this function:

◆ GetFrame()

FORCEINLINE FFrameNumber FFrameTime::GetFrame ( ) const
inline

Access this time's frame number

Definition at line 51 of file FrameTime.h.

+ Here is the caller graph for this function:

◆ GetSubFrame()

FORCEINLINE float FFrameTime::GetSubFrame ( ) const
inline

Access this time's sub frame

Definition at line 59 of file FrameTime.h.

+ Here is the caller graph for this function:

◆ operator=()

FFrameTime & FFrameTime::operator= ( FFrameNumber InFrameNumber)
inline

Assignment from a type-safe frame number

Definition at line 251 of file FrameTime.h.

◆ RoundToFrame()

FORCEINLINE_DEBUGGABLE FFrameNumber FFrameTime::RoundToFrame ( ) const

Round to the nearest frame number

Definition at line 270 of file FrameTime.h.

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

FORCEINLINE_DEBUGGABLE bool operator!= ( FFrameTime A,
FFrameTime B )
friend

Definition at line 105 of file FrameTime.h.

◆ operator%

Definition at line 180 of file FrameTime.h.

◆ operator* [1/2]

Definition at line 208 of file FrameTime.h.

◆ operator* [2/2]

Definition at line 213 of file FrameTime.h.

◆ operator+

Definition at line 146 of file FrameTime.h.

◆ operator+=

Definition at line 135 of file FrameTime.h.

◆ operator- [1/2]

Definition at line 200 of file FrameTime.h.

◆ operator- [2/2]

Definition at line 168 of file FrameTime.h.

◆ operator-=

Definition at line 155 of file FrameTime.h.

◆ operator/

Definition at line 218 of file FrameTime.h.

◆ operator<

Definition at line 123 of file FrameTime.h.

◆ operator<=

Definition at line 129 of file FrameTime.h.

◆ operator==

Definition at line 99 of file FrameTime.h.

◆ operator>

Definition at line 111 of file FrameTime.h.

◆ operator>=

Definition at line 117 of file FrameTime.h.

Member Data Documentation

◆ FrameNumber

FFrameNumber FFrameTime::FrameNumber

Definition at line 91 of file FrameTime.h.

◆ MaxSubframe

const float FFrameTime::MaxSubframe
static

Definition at line 18 of file FrameTime.h.

◆ SubFrame

float FFrameTime::SubFrame
private

Must be 0.f <= SubFrame < 1.f

Definition at line 96 of file FrameTime.h.


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