-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(tools): move most tools to the engine
- Loading branch information
Showing
60 changed files
with
705 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
engine/include/cubos/engine/tools/collider_gizmos/plugin.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/// @dir | ||
/// @brief @ref collider-gizmos-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup collider-gizmos-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/api.hpp> | ||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup collider-gizmos-tool-plugin Collider Gizmos | ||
/// @ingroup tool-plugins | ||
/// @brief Draws gizmos for colliders of selected entities. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup collider-gizmos-tool-plugin | ||
CUBOS_ENGINE_API void colliderGizmosPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// @dir | ||
/// @brief @ref console-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup console-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup console-tool-plugin Console | ||
/// @ingroup tool-plugins | ||
/// @brief Displays the log messages in an ImGui window. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup console-tool-plugin | ||
void consolePlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// @dir | ||
/// @brief @ref debug-camera-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup debug-camera-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup debug-camera-tool-plugin Debug Camera | ||
/// @ingroup tool-plugins | ||
/// @brief Adds a toggleable debug camera. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup debug-camera-tool-plugin | ||
void debugCameraPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
22 changes: 22 additions & 0 deletions
22
engine/include/cubos/engine/tools/ecs_statistics/plugin.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// @dir | ||
/// @brief @ref ecs-statistics-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup ecs-statistics-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup ecs-statistics-tool-plugin ECS Statistics | ||
/// @ingroup tool-plugins | ||
/// @brief Shows tons of statistics and information about the internal state of the ECS. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup ecs-statistics-tool-plugin | ||
void ecsStatisticsPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
22 changes: 22 additions & 0 deletions
22
engine/include/cubos/engine/tools/entity_inspector/plugin.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// @dir | ||
/// @brief @ref entity-inspector-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup entity-inspector-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup entity-inspector-tool-plugin Entity Inspector | ||
/// @ingroup tool-plugins | ||
/// @brief Allows inspecting and modifying the components of the current @ref Selection. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup entity-inspector-tool-plugin | ||
void entityInspectorPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
22 changes: 22 additions & 0 deletions
22
engine/include/cubos/engine/tools/metrics_panel/plugin.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// @dir | ||
/// @brief @ref metrics-panel-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup metrics-panel-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup metrics-panel-tool-plugin Metrics Panel | ||
/// @ingroup tool-plugins | ||
/// @brief Shows some useful performance metrics through a ImGui window. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup metrics-panel-tool-plugin | ||
void metricsPanelPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// @dir | ||
/// @brief @ref play-pause-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup play-pause-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup play-pause-tool-plugin Play Pause | ||
/// @ingroup tool-plugins | ||
/// @brief Allows changing the current simulation speed, or even pause it. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup play-pause-tool-plugin | ||
void playPauseToolPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/// @dir | ||
/// @brief @ref tool-plugins module. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup tool-plugins | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup tool-plugins Tools | ||
/// @ingroup engine | ||
/// @brief Adds various debugging tool plugins. | ||
/// | ||
/// Most of these tools provide their own ImGui windows which can be toggled with the @ref toolbox-plugin. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup tool-plugins | ||
void toolsPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/// @dir | ||
/// @brief @ref selection-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup selection-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
#include <cubos/engine/tools/selection/selection.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup selection-tool-plugin Selection | ||
/// @ingroup tool-plugins | ||
/// @brief Adds a resource which keeps track of what the current selection is. | ||
/// | ||
/// This plugins exists to reduce coupling between plugins. For example, a plugin which allows | ||
/// selecting entities through a ImGui window only needs to depend on this plugin, instead of | ||
/// having to know about all the plugins which care about it. The same applies in the other | ||
/// direction. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup selection-tool-plugin | ||
void selectionPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// @file | ||
/// @brief Resource @ref cubos::engine::Selection. | ||
/// @ingroup selection-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/core/ecs/entity/entity.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @brief Resource which identifies the current selection. | ||
/// @ingroup selection-tool-plugin | ||
struct Selection | ||
{ | ||
CUBOS_REFLECT; | ||
|
||
cubos::core::ecs::Entity entity; ///< Selected entity, or null if none. | ||
}; | ||
} // namespace cubos::engine |
22 changes: 22 additions & 0 deletions
22
engine/include/cubos/engine/tools/settings_inspector/plugin.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// @dir | ||
/// @brief @ref settings-inspector-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup settings-inspector-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup settings-inspector-tool-plugin Settings Inspector | ||
/// @ingroup tool-plugins | ||
/// @brief Allows inspecting the current setting values through a ImGui window. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup settings-inspector-tool-plugin | ||
void settingsInspectorPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// @dir | ||
/// @brief @ref toolbox-tool-plugin plugin directory. | ||
|
||
/// @file | ||
/// @brief Plugin entry point. | ||
/// @ingroup toolbox-tool-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/engine/prelude.hpp> | ||
#include <cubos/engine/tools/toolbox/toolbox.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @defgroup toolbox-tool-plugin Toolbox | ||
/// @ingroup tool-plugins | ||
/// @brief Allows toggling the visibility of other tools. | ||
/// | ||
/// Most tools in the @ref tool-plugins module rely on the @ref Toolbox to keep track of whether they are open or | ||
/// not. | ||
|
||
/// @brief Plugin entry function. | ||
/// @param cubos @b Cubos main class | ||
/// @ingroup toolbox-tool-plugin | ||
void toolboxPlugin(Cubos& cubos); | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.