Animation.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: Animation.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Abstract base class for animation-related class.
6 > Created Time: 2017/04/19
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_ANIMATION_H
10 #define CUBBYFLOW_ANIMATION_H
11 
12 #include <Core/Animation/Frame.h>
13 
14 #include <memory>
15 
16 namespace CubbyFlow
17 {
26  class Animation
27  {
28  public:
29  Animation();
30 
31  virtual ~Animation();
32 
39  void Update(const Frame& frame);
40 
41  protected:
50  virtual void OnUpdate(const Frame& frame) = 0;
51  };
52 
54  using AnimationPtr = std::shared_ptr<Animation>;
55 }
56 
57 #endif
void Update(const Frame &frame)
Updates animation state for given frame.
Definition: pybind11Utils.h:24
virtual void OnUpdate(const Frame &frame)=0
The implementation of this function should update the animation state for given Frame instance frame...
std::shared_ptr< Animation > AnimationPtr
Shared pointer for the Animation type.
Definition: Animation.h:54
Abstract base class for animation-related class.
Definition: Animation.h:26
Representation of an animation frame.
Definition: Frame.h:20