Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Misc
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Misc/FrameTime.h |
| Include | #include "Misc/FrameTime.h" |
Syntax
struct FFrameTime
Remarks
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
Variables
| Type | Name | Description | |
|---|---|---|---|
| FFrameNumber | FrameNumber |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FFrameTime () |
Default constructor initializing to zero | ||
FFrameTime
(
T InFrameNumber |
Implicit construction from a single integer, while disallowing implicit conversion from any other numeric type | ||
FFrameTime
(
FFrameNumber InFrameNumber |
Implicit construction from a type-safe frame number | ||
FFrameTime
(
FFrameNumber InFrameNumber, |
Construction from a frame number and a sub frame |
Functions
| Type | Name | Description | |
|---|---|---|---|
| double | AsDecimal () |
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. | |
| FFrameNumber | CeilToFrame () |
Return the next frame number greater than or equal to this frame time | |
| FFrameNumber | FloorToFrame () |
Return the first frame number less than or equal to this frame time | |
| FFrameTime | FromDecimal
(
double InDecimalFrame |
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 | |
| FFrameNumber | GetFrame () |
Access this time's frame number | |
| float | GetSubFrame () |
Access this time's sub frame | |
| FFrameNumber | RoundToFrame () |
Round to the nearest frame number | |
| bool | Serializes the given FrameTime from or into the specified archive |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FFrameTime & | operator=
(
FFrameNumber InFrameNumber |
Assignment from a type-safe frame number |
Constants
| Name | Description |
|---|---|
| MaxSubframe |