CubbyFlow::Frame Struct Referencefinal
Representation of an animation frame. More...
#include <Core/Animation/Frame.hpp>
Public Member Functions | |
Frame ()=default | |
Default constructor: A 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... | |
Detailed Description
Representation of an animation frame.
This struct holds current animation frame index and frame interval in seconds.
Constructor & Destructor Documentation
◆ Frame() [1/2]
|
default |
Default constructor: A Frame instance with 1/60 seconds time interval.
◆ Frame() [2/2]
CubbyFlow::Frame::Frame | ( | int | newIndex, |
double | newTimeIntervalInSeconds | ||
) |
Constructs Frame instance with given time interval.
Member Function Documentation
◆ Advance() [1/2]
void CubbyFlow::Frame::Advance | ( | ) |
Advances single frame.
◆ Advance() [2/2]
void CubbyFlow::Frame::Advance | ( | int | delta | ) |
Advances multiple frames.
- Parameters
-
delta Number of frames to advance.
◆ operator++() [1/2]
Frame& CubbyFlow::Frame::operator++ | ( | ) |
Advances single frame (prefix).
◆ operator++() [2/2]
Frame CubbyFlow::Frame::operator++ | ( | int | ) |
Advances single frame (postfix).
◆ TimeInSeconds()
double CubbyFlow::Frame::TimeInSeconds | ( | ) | const |
Returns the elapsed time in seconds.
Member Data Documentation
◆ index
int CubbyFlow::Frame::index = 0 |
Frame index.
◆ timeIntervalInSeconds
double CubbyFlow::Frame::timeIntervalInSeconds = 1.0 / 60.0 |
Time interval in seconds between two adjacent frames.
The documentation for this struct was generated from the following file:
- Core/Animation/Frame.hpp