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
>
25
#include <
neogfx/game/system.hpp
>
26
#include <
neogfx/game/animation_filter.hpp
>
27
#include <
neogfx/game/mesh_renderer.hpp
>
28
#include <
neogfx/game/mesh_render_cache.hpp
>
29
30
namespace
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);
38
~animator
();
39
public
:
40
const
system_id
&
id
()
const override
;
41
const
i_string
&
name
()
const override
;
42
public
:
43
bool
apply
()
override
;
44
public
:
45
void
update_animations
();
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
:
61
scoped_component_lock<entity_info, mesh_render_cache, animation_filter>
iLock;
62
};
63
}
animation_filter.hpp
neogfx::game::animator
Definition
animator.hpp:33
neogfx::game::animator::name
const i_string & name() const override
neogfx::game::animator::~animator
define_event(Animate, animate, step_time) public ~animator()
neogfx::game::animator::apply
bool apply() override
neogfx::game::animator::update_animations
void update_animations()
neogfx::game::animator::id
const system_id & id() const override
neolib::ecs::i_ecs
Definition
i_ecs.hpp:85
neolib::ecs::scoped_component_lock
Definition
i_ecs.hpp:340
neolib::ecs::system
Definition
system.hpp:58
neolib::i_string
Definition
i_string.hpp:49
mesh_render_cache.hpp
mesh_renderer.hpp
neogfx::game
Definition
aabb_octree.hpp:31
neolib::ecs::step_time
step_time_interval step_time
Definition
chrono.hpp:59
event.hpp
system.hpp
neogfx.hpp
chrono.hpp
define_event
#define define_event(name, declName,...)
Definition
event.hpp:200
neogfx::game::animator::meta
Definition
animator.hpp:48
neogfx::game::animator::meta::id
static const neolib::uuid & id()
Definition
animator.hpp:49
neogfx::game::animator::meta::name
static const i_string & name()
Definition
animator.hpp:54
neolib::uuid
Definition
uuid.hpp:51
include
neogfx
game
animator.hpp
Generated by
1.9.8