Ark Server API (ASA) - Wiki
|
#include <FrameRate.h>
Public Member Functions | |
FFrameRate () | |
FFrameRate (uint32 InNumerator, uint32 InDenominator) | |
bool | IsValid () const |
double | AsInterval () const |
double | AsDecimal () const |
double | AsSeconds (FFrameTime FrameNumber) const |
FFrameTime | AsFrameTime (double InTimeSeconds) const |
FFrameNumber | AsFrameNumber (double InTimeSeconds) const |
bool | IsMultipleOf (FFrameRate Other) const |
bool | IsFactorOf (FFrameRate Other) const |
FText | ToPrettyText () const |
bool | ComputeGridSpacing (const float PixelsPerSecond, double &OutMajorInterval, int32 &OutMinorDivisions, float MinTickPx=30.f, float DesiredMajorTickPx=120.f) const |
double | MaxSeconds () const |
FFrameRate | Reciprocal () const |
bool | Serialize (FArchive &Ar) |
Static Public Member Functions | |
static FFrameTime | TransformTime (FFrameTime SourceTime, FFrameRate SourceRate, FFrameRate DestinationRate) |
static FFrameTime | Snap (FFrameTime SourceTime, FFrameRate SourceRate, FFrameRate SnapToRate) |
Public Attributes | |
int32 | Numerator |
int32 | Denominator |
Friends | |
bool | operator== (const FFrameRate &A, const FFrameRate &B) |
bool | operator!= (const FFrameRate &A, const FFrameRate &B) |
FFrameRate | operator* (FFrameRate A, FFrameRate B) |
FFrameRate | operator/ (FFrameRate A, FFrameRate B) |
double | operator/ (FFrameNumber Frame, FFrameRate Rate) |
TRange< double > | operator/ (const TRange< FFrameNumber > &FrameRange, FFrameRate Rate) |
double | operator/ (FFrameTime FrameTime, FFrameRate Rate) |
FFrameTime | operator* (double TimeInSeconds, FFrameRate Rate) |
FFrameTime | operator* (float TimeInSeconds, FFrameRate Rate) |
FArchive & | operator<< (FArchive &Ar, FFrameRate &FrameRate) |
A frame rate represented as a fraction comprising 2 integers: a numerator (number of frames), and a denominator (per second)
Definition at line 21 of file FrameRate.h.
|
inline |
Default construction to a frame rate of 60000 frames per second (0.0166 ms)
Definition at line 26 of file FrameRate.h.
|
inline |
Get the decimal representation of this framerate
Definition at line 221 of file FrameRate.h.
|
inline |
Convert the specified time in seconds to a frame number by rounding down to the nearest integer.
InTimeSeconds | The time to convert in seconds |
Definition at line 252 of file FrameRate.h.
|
inline |
Convert the specified time in seconds to a frame number by rounding down to the nearest integer.
InTimeSeconds | The time to convert in seconds |
Definition at line 234 of file FrameRate.h.
|
inline |
Get the decimal representation of this framerate's interval
Definition at line 216 of file FrameRate.h.
|
inline |
Convert the specified frame number to a floating-point number of seconds based on this framerate
FrameNumber | The frame number to convert |
Definition at line 226 of file FrameRate.h.
bool FFrameRate::ComputeGridSpacing | ( | const float | PixelsPerSecond, |
double & | OutMajorInterval, | ||
int32 & | OutMinorDivisions, | ||
float | MinTickPx = 30.f, | ||
float | DesiredMajorTickPx = 120.f ) const |
Compute a desirable grid spacing for the specified screen units
PixelsPerSecond | The number of pixels representing a second of time |
OutMajorInterval | (Out) The interval in seconds at which to draw major grid lines |
OutMinorDivisions | (Out) The number of divisions to draw between major tick lines |
MinTickPx | (Optional) The smallest size in pixels that is desirable between ticks |
DesiredMajorTickPx | (Optional) The desired size to compute major tick lines from |
|
inline |
Check whether this frame rate is a factor of another
Definition at line 311 of file FrameRate.h.
|
inline |
Check whether this frame rate is a multiple of another
Definition at line 303 of file FrameRate.h.
|
inline |
Verify that this frame rate is valid to use
Definition at line 47 of file FrameRate.h.
double FFrameRate::MaxSeconds | ( | ) | const |
Get the maximum number of seconds representable with this framerate
|
inline |
Get the reciprocal of this frame rate
Definition at line 146 of file FrameRate.h.
|
inlinestatic |
Snap a time specified in one framerate, to another
SourceTime | The frame number to convert |
SourceRate | The source frame rate |
SnapToRate | The destination frame rate |
Definition at line 298 of file FrameRate.h.
FText FFrameRate::ToPrettyText | ( | ) | const |
Convert this frame rate to a prettified text string.
|
inlinestatic |
Convert the specified time from one framerate to another framerate
SourceTime | The frame number to convert |
SourceRate | The source frame rate |
DestinationRate | The destination frame rate |
Definition at line 293 of file FrameRate.h.
|
friend |
Definition at line 156 of file FrameRate.h.
|
friend |
Definition at line 201 of file FrameRate.h.
|
friend |
Definition at line 161 of file FrameRate.h.
|
friend |
Definition at line 206 of file FrameRate.h.
|
friend |
Definition at line 176 of file FrameRate.h.
|
friend |
Definition at line 171 of file FrameRate.h.
|
friend |
Definition at line 166 of file FrameRate.h.
|
friend |
Definition at line 196 of file FrameRate.h.
|
friend |
|
friend |
Definition at line 151 of file FrameRate.h.
int32 FFrameRate::Denominator |
The denominator of the framerate represented as a number of frames per second (e.g. 1 for 60 fps)
Definition at line 42 of file FrameRate.h.
int32 FFrameRate::Numerator |
The numerator of the framerate represented as a number of frames per second (e.g. 60 for 60 fps)
Definition at line 37 of file FrameRate.h.