Jet
v1.3.3
|
Abstract base class for animation-related class. More...
#include <jet/animation.h>
Public Member Functions | |
Animation () | |
virtual | ~Animation () |
void | update (const Frame &frame) |
Updates animation state for given frame . More... | |
Protected Member Functions | |
virtual void | onUpdate (const Frame &frame)=0 |
The implementation of this function should update the animation state for given Frame instance frame . More... | |
Abstract base class for animation-related class.
This class represents the animation logic in very abstract level. Generally animation is a function of time and/or its previous state. This base class provides a virtual function update() which can be overriden by its sub-classes to implement their own state update logic.
jet::Animation::Animation | ( | ) |
|
virtual |
|
protectedpure virtual |
The implementation of this function should update the animation state for given Frame instance frame
.
This function is called from Animation::update when state of this class instance needs to be updated. Thus, the inherited class should overrride this function and implement its logic for updating the animation state.
void jet::Animation::update | ( | const Frame & | frame | ) |
Updates animation state for given frame
.
This function updates animation state by calling Animation::onUpdate function.