|
Oxygen Engine
Modern C++ 3D Engine using OpenGL
|
Show extensive debugging informations about the scene. More...
#include <OxygenEngine/component/debug.h>
Public Member Functions | |
| Debug (oe::scene::Scene &scene, core::Device &device, core::Window &window, oe::core::EventHandler &event_handler) | |
| Constructor. | |
| void | update (const std::chrono::nanoseconds delta) |
| Update the component. | |
| void | onNodeRemove (oe::scene::Node &node) |
| Run actions on node removal. | |
| void | render () |
| Render the Debug GUI. | |
| void | dumpSceneToFile (const std::string &filename) const |
| Save all scene transforms into a json file. | |
| void | loadSceneFromFile (const std::string &filename) |
| Load all scene transforms from a json file. | |
Public Attributes | |
| bool | is_active = true |
| Toggle the status of the component. | |
| bool | show_help_tooltips = false |
| Toggle to add tooltips to help understand some widget meaning. | |
| bool | show_origin = true |
| Toggle to show world origin. | |
| bool | show_all_nodes_aabb = false |
| Toggle to show bounding boxes of all nodes. | |
| bool | show_selected_node_aabb = true |
| Toggle to show bounding boxes of selected node. | |
| glm::vec3 | selected_node_aabb_color = glm::vec3(1.0f, 1.0f, 0.0f) |
| Color of selected node AABB. | |
| glm::vec3 | all_nodes_aabb_color = glm::vec3(1.0f, 0.0f, 1.0f) |
| Color of all nodes AABB. | |
| oe::scene::NodePtr | current_node_details = {} |
| The node in the detail window. | |
| FpsCamera | fps_camera |
| the FPS Camera | |
Show extensive debugging informations about the scene.
Features:
Code usage:
| oe::component::Debug::Debug | ( | oe::scene::Scene & | scene, |
| core::Device & | device, | ||
| core::Window & | window, | ||
| oe::core::EventHandler & | event_handler ) |
Constructor.
| scene | 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) |
| void oe::component::Debug::dumpSceneToFile | ( | const std::string & | filename | ) | const |
Save all scene transforms into a json file.
The oe::core::Filesystem might not be available/ready, the save is done using classic fstream
| filename | File to save (relative to the working folder) |
| void oe::component::Debug::loadSceneFromFile | ( | const std::string & | filename | ) |
Load all scene transforms from a json file.
The oe::core::Filesystem might not be available/ready, the load is done using classic fstream
| filename | File to load (relative to the working folder) |
| void oe::component::Debug::onNodeRemove | ( | oe::scene::Node & | node | ) |
Run actions on node removal.
Used to update detail view if the displayed node is removed
| node | The node that will be removed |
| void oe::component::Debug::render | ( | ) |
Render the Debug GUI.
| void oe::component::Debug::update | ( | const std::chrono::nanoseconds | delta | ) |
Update the component.
| delta | delta time |
| bool oe::component::Debug::is_active = true |
Toggle the status of the component.
The component won't react nor display GUI if its not active.
Debug objects will be still rendered (can be disabled in settings)