Loading...
Searching...
No Matches
Animation.hpp
Go to the documentation of this file.
1// This code is based on Jet framework.
2// Copyright (c) 2018 Doyub Kim
3// CubbyFlow is voxel-based fluid simulation engine for computer games.
4// Copyright (c) 2020 CubbyFlow Team
5// Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6// AI Part: Dongheon Cho, Minseo Kim
7// We are making my contributions/submissions to this project solely in our
8// personal capacity and are not conveying any rights to any intellectual
9// property of any third parties.
10
11#ifndef CUBBYFLOW_ANIMATION_HPP
12#define CUBBYFLOW_ANIMATION_HPP
13
15
16#include <memory>
17
18namespace CubbyFlow
19{
29{
30 public:
32 Animation() = default;
33
35 Animation(const Animation&) = default;
36
38 Animation(Animation&&) noexcept = default;
39
41 virtual ~Animation() = default;
42
44 Animation& operator=(const Animation&) = default;
45
47 Animation& operator=(Animation&&) noexcept = default;
48
55 void Update(const Frame& frame);
56
57 protected:
66 virtual void OnUpdate(const Frame& frame) = 0;
67};
68
70using AnimationPtr = std::shared_ptr<Animation>;
71} // namespace CubbyFlow
72
73#endif
Abstract base class for animation-related class.
Definition Animation.hpp:29
Animation(const Animation &)=default
Default copy constructor.
Animation()=default
Default constructor.
void Update(const Frame &frame)
Updates animation state for given frame.
virtual void OnUpdate(const Frame &frame)=0
The implementation of this function should update the animation state for given Frame instance frame.
Animation(Animation &&) noexcept=default
Default move constructor.
Definition pybind11Utils.hpp:21
std::shared_ptr< Animation > AnimationPtr
Shared pointer for the Animation type.
Definition Animation.hpp:70
Representation of an animation frame.
Definition Frame.hpp:23