-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathGraph.h
56 lines (43 loc) · 1.36 KB
/
Graph.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) 2023 Hugo Amiard [email protected]
// This software is provided 'as-is' under the zlib License, see the LICENSE.txt file.
// This notice and the license may not be removed or altered from any source distribution.
#pragma once
#include <gfx/Forward.h>
#include <gfx/Node3.h>
#include <gfx/Light.h>
namespace two
{
class SoundManager;
class Sound;
#ifndef _MSC_VER
extern template class Graph<Gnode>;
#endif
export_ class refl_ TWO_GFX_EXPORT Gnode : public Graph<Gnode>
{
public:
Gnode();
Gnode(Scene& scene, SoundManager* sound_manager = nullptr);
Gnode(Gnode* parent, void* identity);
~Gnode();
void clear();
template <class T, class... Args>
T* instantiate(Scene& scene, Args&&... args);
template <class T>
T* as();
Scene* m_scene = nullptr;
Node3* m_attach = nullptr;
Type* m_type = nullptr;
void* m_object = nullptr;
function<void()> m_deleter;
Sound* m_sound = nullptr;
SoundManager* m_sound_manager = nullptr;
};
extern template class refl_ TPool<Node3>;
extern template class refl_ TPool<Item>;
extern template class refl_ TPool<Batch>;
extern template class refl_ TPool<Direct>;
extern template class refl_ TPool<Mime>;
extern template class refl_ TPool<Light>;
extern template class refl_ TPool<Flare>;
export_ TWO_GFX_EXPORT void debug_tree(Gnode& node, size_t index = 0, size_t depth = 0);
}