Jet
v1.3.3
|
Representation of an animation frame. More...
#include <jet/animation.h>
Public Member Functions | |
Frame () | |
Constructs Frame instance with 1/60 seconds time interval. More... | |
Frame (int newIndex, double newTimeIntervalInSeconds) | |
Constructs Frame instance with given time interval. More... | |
double | timeInSeconds () const |
Returns the elapsed time in seconds. More... | |
void | advance () |
Advances single frame. More... | |
void | advance (int delta) |
Frame & | operator++ () |
Advances single frame (prefix). More... | |
Frame | operator++ (int) |
Advances single frame (postfix). More... | |
Public Attributes | |
int | index = 0 |
Frame index. More... | |
double | timeIntervalInSeconds = 1.0 / 60.0 |
Time interval in seconds between two adjacent frames. More... | |
Representation of an animation frame.
This struct holds current animation frame index and frame interval in seconds.
jet::Frame::Frame | ( | ) |
Constructs Frame instance with 1/60 seconds time interval.
jet::Frame::Frame | ( | int | newIndex, |
double | newTimeIntervalInSeconds | ||
) |
Constructs Frame instance with given time interval.
void jet::Frame::advance | ( | ) |
Advances single frame.
void jet::Frame::advance | ( | int | delta | ) |
Advances multiple frames.
delta | Number of frames to advance. |
Frame& jet::Frame::operator++ | ( | ) |
Advances single frame (prefix).
Frame jet::Frame::operator++ | ( | int | ) |
Advances single frame (postfix).
double jet::Frame::timeInSeconds | ( | ) | const |
Returns the elapsed time in seconds.
int jet::Frame::index = 0 |
Frame index.
double jet::Frame::timeIntervalInSeconds = 1.0 / 60.0 |
Time interval in seconds between two adjacent frames.