25 void init(f32 startFrame, f32 endFrame);
33 void play(f32 updateRate, Type_e type, f32 startFrame, f32 endFrame);
39 void play(f32 updateRate, Type_e type);
f32 m_startFrame
Lower bound of the frame interval.
void calc()
Updates the frame counter.
void setUpdateRate(f32 updateRate)
Sets the update rate.
FrameCounter_c()
Constructs a new frame counter.
void play(f32 updateRate, Type_e type, f32 startFrame, f32 endFrame)
Fully initializes into a valid state.
~FrameCounter_c()
Destroys the frame counter.
bool getFinished() const
Gets whether the counter is finished.
void init(f32 startFrame, f32 endFrame)
Initializes the frame interval.
f32 m_frame
The current frame in the interval [start, end].
f32 getFrame() const
Gets the current frame.
bool m_finished
Whether or not the counter is finished.
Type_e m_type
Controls what happens to the frame when it reaches the target frame.
f32 m_updateRate
Controls the direction and rate at which the frame updates.
f32 getUpdateRate() const
Gets the update rate.
f32 m_endFrame
Upper bound of the frame interval.
Type_e
The possible behaviors after the frame counter is finished.
@ TYPE_ONETIME
Locks the frame to the target frame.
@ TYPE_LOOP
Continues counting in the same direction.
@ TYPE_OSCILLATING
Continues counting in the opposite direction.
void setFrame(f32 frame)
Sets the current frame.