FFrameRate

A frame rate represented as a fraction comprising 2 integers: a numerator (number of frames), and a denominator (per second)

Windows
MacOS
Linux

Inheritance Hierarchy

FFrameRate

FLiveLinkFrameRate

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/FrameRate.h

Include

#include "Misc/FrameRate.h"

Syntax

struct FFrameRate

Remarks

A frame rate represented as a fraction comprising 2 integers: a numerator (number of frames), and a denominator (per second)

Variables

Name Description

Public variable

int32

 

Denominator

The denominator of the framerate represented as a number of frames per second (e.g. 1 for 60 fps)

Public variable

int32

 

Numerator

The numerator of the framerate represented as a number of frames per second (e.g. 60 for 60 fps)

Constructors

Name Description

Public function

FFrameRate()

Default construction to a frame rate of 60000 frames per second (0.0166 ms)

Public function

FFrameRate

(
    uint32 InNumerator,
    uint32 InDenominator
)

Functions

Name Description

Public function Const

double

 

AsDecimal()

Get the decimal representation of this framerate

Public function Const

FFrameNumber

 

AsFrameNumber

(
    double InTimeSeconds
)

Convert the specified time in seconds to a frame number by rounding down to the nearest integer.

Public function Const

FFrameTime

 

AsFrameTime

(
    double InTimeSeconds
)

Convert the specified time in seconds to a frame number by rounding down to the nearest integer.

Public function Const

double

 

AsInterval()

Get the decimal representation of this framerate's interval

Public function Const

double

 

AsSeconds

(
    FFrameTime FrameNumber
)

Convert the specified frame number to a floating-point number of seconds based on this framerate

Public function Const

bool

 

ComputeGridSpacing

(
    const float PixelsPerSecond,
    double& OutMajorInterval,
    int32 & OutMinorDivisions,
    float MinTickPx,
    float DesiredMajorTickPx
)

Compute a desirable grid spacing for the specified screen units

Public function Const

bool

 

IsFactorOf

(
    FFrameRate Other
)

Check whether this frame rate is a factor of another

Public function Const

bool

 

IsMultipleOf

(
    FFrameRate Other
)

Check whether this frame rate is a multiple of another

Public function Const

bool

 

IsValid()

Verify that this frame rate is valid to use

Public function Const

double

 

MaxSeconds()

Get the maximum number of seconds representable with this framerate

Public function Const

FFrameRate

 

Reciprocal()

Get the reciprocal of this frame rate

Public function Static

FFrameTime

 

Snap

(
    FFrameTime SourceTime,
    FFrameRate SourceRate,
    FFrameRate SnapToRate
)

Snap a time specified in one framerate, to another

Public function Const

FText

 

ToPrettyText()

Convert this frame rate to a prettified text string.

Public function Static

FFrameTime

 

TransformTime

(
    FFrameTime SourceTime,
    FFrameRate SourceRate,
    FFrameRate DestinationRate
)

Convert the specified time from one framerate to another framerate

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback