neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
animator.hpp
Go to the documentation of this file.
1// animator.hpp
2/*
3 neogfx C++ App/Game Engine
4 Copyright (c) 2020 Leigh Johnston. All Rights Reserved.
5
6 This program is free software: you can redistribute it and / or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
23#include <neolib/ecs/chrono.hpp>
24#include <neogfx/core/event.hpp>
29
30namespace neogfx::game
31{
32 class animator : public game::system<entity_info, animation_filter, mesh_renderer, mesh_render_cache>
33 {
34 public:
35 define_event(Animate, animate, step_time)
36 public:
37 animator(i_ecs& aEcs);
39 public:
40 const system_id& id() const override;
41 const i_string& name() const override;
42 public:
43 bool apply() override;
44 public:
46 public:
47 struct meta
48 {
49 static const neolib::uuid& id()
50 {
51 static const neolib::uuid sId = { 0x3b889df8, 0x9810, 0x4f61, 0xbcfc,{ 0xcf, 0xda, 0xb7, 0xea, 0x90, 0x27 } };
52 return sId;
53 }
54 static const i_string& name()
55 {
56 static const string sName = "Animator";
57 return sName;
58 }
59 };
60 private:
62 };
63}
const i_string & name() const override
define_event(Animate, animate, step_time) public ~animator()
bool apply() override
const system_id & id() const override
step_time_interval step_time
Definition chrono.hpp:59
#define define_event(name, declName,...)
Definition event.hpp:200
static const neolib::uuid & id()
Definition animator.hpp:49
static const i_string & name()
Definition animator.hpp:54