Responsible for playing a users' animation.
More...
#include <Player.h>
Responsible for playing a users' animation.
- Invariant
- m_CurFrame is always a valid frame index within m_Proj
- Note
- Play() advances frames over time using m_TimeElapsed
-
AnimationPlayer maintains internal playback state (frame + time accumulator)
-
Rewind() resets playback to the first frame
◆ AnimationPlayer()
Creates a player for a project.
- Parameters
-
| proj | Project whose frames will be played back. |
◆ ~AnimationPlayer()
| FuncDoodle::AnimationPlayer::~AnimationPlayer |
( |
| ) |
|
|
default |
◆ CurFrame()
| unsigned long FuncDoodle::AnimationPlayer::CurFrame |
( |
| ) |
const |
|
inlinenodiscardconstexpr |
Returns the current playback frame index.
- Returns
- Current frame index.
◆ End()
| void FuncDoodle::AnimationPlayer::End |
( |
| ) |
|
Jumps playback to the final frame.
◆ Play()
| void FuncDoodle::AnimationPlayer::Play |
( |
| ) |
|
Advances playback based on elapsed time.
◆ Playing()
| bool FuncDoodle::AnimationPlayer::Playing |
( |
| ) |
const |
|
inlinenodiscardconstexpr |
Returns whether playback is currently active.
- Returns
- Playback state.
◆ Proj()
Returns the project used for playback.
- Returns
- Shared pointer to the active project.
◆ Rewind()
| void FuncDoodle::AnimationPlayer::Rewind |
( |
| ) |
|
Resets playback to the first frame.
◆ SetCurFrame()
| void FuncDoodle::AnimationPlayer::SetCurFrame |
( |
unsigned long | frame | ) |
|
|
inlineconstexpr |
Sets the current playback frame index.
- Parameters
-
| frame | Frame index to jump to. |
◆ SetPlaying()
| void FuncDoodle::AnimationPlayer::SetPlaying |
( |
bool | playing | ) |
|
|
inlineconstexpr |
Sets whether playback is active.
- Parameters
-
| playing | New playback state. |
◆ SetProj()
Replaces the project used for playback.
- Parameters
-
◆ m_CurFrame
| unsigned long FuncDoodle::AnimationPlayer::m_CurFrame = 0L |
|
private |
◆ m_Playing
| bool FuncDoodle::AnimationPlayer::m_Playing |
|
private |
◆ m_Proj
◆ m_TimeElapsed
| float FuncDoodle::AnimationPlayer::m_TimeElapsed = 0.0f |
|
private |
The documentation for this class was generated from the following files: