Show extensive debugging informations about the scene.
More...
#include <OxygenEngine/scene/component/scene/debug.h>
|
| EntityComponent (Manager &entity) |
|
Manager & | _entity |
|
Show extensive debugging informations about the scene.
Features:
- Easily see the nodes hierarchy with a interactive tree
- Right click on a node to get more details
- Detailed information about nodes
- Class name
- Toggle visibility
- Editable local Transform (Translation, rotation (euler angles), scale)
- Global Transform (Translation, rotation (euler angles), scale)
- Components list (Class, enable/disable, properties)
- Save / load all scene transforms into scene-dump.json (in application working folder)
- Absolute node names are saved
- Helps saving reproducible scene states
- Show/hide origin axis
- Get information about the running application
- FPS
- Window position
- Cursor position (relative to top-left window corner)
- Current timestamp
- Device uptime in seconds
- VSync toggle
- Get information about Oxygen Engine
- Version
- Commit
- Build date
Code usage:
(
"The name you want to give to this component"
device,
window,
event_handler
);
void your_application_update(const double& delta)
{
}
void your_application_render()
{
scene_debug->render();
}
Show extensive debugging informations about the scene.
Definition debug.h:81
void update(const double delta)
- See also
- An example can be found in the extended_debug.cpp
- Note
- The component won't react nor display GUI if its not active
◆ Debug()
Constructor
- Parameters
-
scene_manager | Scene bound to the component |
device | Engine device (used to capture device information) |
window | Main window (used to capture window information + resolution) |
event_handler | Event handler (used to update the UI and show input status) |
◆ dumpSceneToFile()
void oe::component::scene::Debug::dumpSceneToFile |
( |
const std::string & |
filename | ) |
const |
Save all scene transform into a json file
- Parameters
-
filename | File to save (relative to the working folder) |
◆ loadSceneFromFile()
void oe::component::scene::Debug::loadSceneFromFile |
( |
const std::string & |
filename | ) |
|
Load all scene transforms from a json file
- Parameters
-
filename | File to load (relative to the working folder) |
◆ onNodeRemove()
virtual void oe::component::scene::Debug::onNodeRemove |
( |
oe::scene::Node & |
node | ) |
|
|
overridevirtual |
Run actions on node removal
Used to update detail view if the displayed node is removed
- Parameters
-
node | The node that will be removed |
Reimplemented from oe::scene::SceneComponent.
◆ render()
void oe::component::scene::Debug::render |
( |
| ) |
|
Render the Debug GUI
- Note
- The oe::render::Debug is not rendered here to let you handle it yourself according to your pipeline
◆ update()
void oe::component::scene::Debug::update |
( |
const double |
delta | ) |
|
Update the component
- Note
- As it does internal computation (eg FPS), it should be called only once per frame. hence not overriding onUpdate
- Parameters
-
◆ current_node_details
oe::scene::Node* oe::component::scene::Debug::current_node_details = nullptr |
The node in the detail window
◆ show_help_tooltips
bool oe::component::scene::Debug::show_help_tooltips = false |
Toggle to add tooltips to help understand some widget meaning
◆ show_origin
bool oe::component::scene::Debug::show_origin = true |
Toggle to show world origin
The documentation for this class was generated from the following file:
- OxygenEngine/scene/component/scene/debug.h