fennec
Loading...
Searching...
No Matches
scene_node.h
Go to the documentation of this file.
1// =====================================================================================================================
2// fennec, a free and open source game engine
3// Copyright © 2025 Medusa Slockbower
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <https://www.gnu.org/licenses/>.
17// =====================================================================================================================
18
30
31#ifndef FENNEC_SCENE_NODE_H
32#define FENNEC_SCENE_NODE_H
33
34#include <fennec/scene/component.h>
35
36#include <fennec/string/string.h>
37
38#include <fennec/rtti/enable.h>
39
40namespace fennec
41{
42
43struct scene_node {
44
45// Public Members ======================================================================================================
46public:
47 scene* const scene;
48 const size_t id;
49 string name;
50
51 scene_node(fennec::scene* scn, size_t id, const string& name)
52 : scene(scn), id(id)
53 , name(fennec::move(name)) {
54 }
55
56
57private:
58 dynarray<component*> _components;
59
60 FENNEC_RTTI_CLASS_ENABLE() {
61 }
62};
63
64}
65
66#endif // FENNEC_SCENE_NODE_H
Main Scene Hierarchy.
Definition scene.h:36
constexpr remove_reference_t< T > && move(T &&x) noexcept
produces an x-value type to indicate x may be "moved"
Definition utility.h:92