Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
debug.h
1#ifndef OE_SCENE_COMPONENT_SCENE_DEBUG_H
2#define OE_SCENE_COMPONENT_SCENE_DEBUG_H
3
4#include "../../../common.h"
5
6#ifndef OXYGEN_ENGINE_DEBUG_TOOLS
7 #error Debug tools are not included in this build, please enable then with OE_DEBUG_TOOLS CMake option
8#endif
9
10#include "../../../core/device.h"
11#include "../../../gui/manager.h"
12
13#include "../../manager.h"
14
16{
81 {
82 public:
91 oe::scene::Manager& scene_manager,
92 core::Device& device,
93 core::Window& window,
94 oe::core::EventHandler& event_handler
95 );
96
104 void update(const double delta);
105
113 virtual void onNodeRemove(oe::scene::Node& node) override;
114
120 void render();
121
127 void dumpSceneToFile(const std::string& filename) const;
128
134 void loadSceneFromFile(const std::string& filename);
135
139 bool show_help_tooltips = false;
140
144 bool show_origin = true;
145
150
151 private:
152 gui::Manager _gui;
153
154 core::Device& _device;
155 core::Window& _window;
156 oe::core::EventHandler& _event_handler;
157
158 int32_t _last_id = 0;
159
160 int _frame_count = 0;
161 double _render_time = 0;
162
163 int _last_fps = 0;
164
165 void _generate_gui(nk_context* context);
166
167 void _treat_node(nk_context* context, oe::scene::Node& node);
168 void _node_tooltip(nk_context* context, oe::scene::Node& node);
169
170 void _node_details(nk_context* context, oe::scene::Node& node);
171 void _node_transforms(nk_context* context, oe::scene::Node& node);
172 void _camera_settings(nk_context* context);
173 };
174}
175
176#endif
Show extensive debugging informations about the scene.
Definition debug.h:81
void dumpSceneToFile(const std::string &filename) const
virtual void onNodeRemove(oe::scene::Node &node) override
oe::scene::Node * current_node_details
Definition debug.h:149
void loadSceneFromFile(const std::string &filename)
bool show_help_tooltips
Definition debug.h:139
bool show_origin
Definition debug.h:144
Debug(oe::scene::Manager &scene_manager, core::Device &device, core::Window &window, oe::core::EventHandler &event_handler)
void update(const double delta)
The OxygenEngine device that will manage events, windows, scene, etc...
Definition device.h:18
Event handler.
Definition event_handler.h:22
Definition window.h:24
Definition manager.h:39
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
Components bound to the scene.
Definition debug.h:16