Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
scene.h
1#ifndef OE_SCENE_COMPONENT_SCENE_H
2#define OE_SCENE_COMPONENT_SCENE_H
3
4#include "component.h"
5
6namespace oe::scene
7{
8 class Node;
9 class Manager;
10
15 {
16 public:
23 oe::component::EntityComponent<Manager>(entity)
24 {}
25
30 {
31 return static_cast<Manager&>(_entity);
32 }
33
37 const Manager& getSceneManager() const
38 {
39 return static_cast<Manager&>(_entity);
40 }
41
48 virtual void onNodeAdd(Node&)
49 {}
50
57 virtual void onNodeRemove(Node&)
58 {}
59 };
60}
61
62#endif
Component bound to a specific entity.
Definition component.h:80
Scene manager.
Definition manager.h:21
Definition node.h:31
Parent class of components that can be bound to a scene::Manager.
Definition scene.h:15
const Manager & getSceneManager() const
Get Scene bound to this component.
Definition scene.h:37
Manager & getSceneManager()
Get Scene bound to this component.
Definition scene.h:29
virtual void onNodeRemove(Node &)
Run actions before a node is removed.
Definition scene.h:57
SceneComponent(Manager &entity)
Constructor.
Definition scene.h:22
virtual void onNodeAdd(Node &)
Run actions after a node is added.
Definition scene.h:48
Scene related management (Render-agnostic Geometry, Manger, etc...)
Definition debug.h:19
Oxygen Engine common namespace.
Definition cursor.h:8