|
candlewick 0.10.0-4-g76c0
A tiny cross-platform renderer based on SDL3
|
Scene for organizing debug entities and render systems. More...
#include <candlewick/core/DebugScene.h>
Public Types | |
| enum | : Uint32 { TRANSFORM_SLOT = 0 } |
| enum | : Uint32 { COLOR_SLOT = 0 } |
Public Member Functions | |
| const Mesh & | getMesh (DebugMeshType type) const |
| DebugScene (entt::registry ®istry, const RenderContext &renderer) | |
| DebugScene (const DebugScene &)=delete | |
| DebugScene & | operator= (const DebugScene &)=delete |
| DebugScene (DebugScene &&other) | |
| DebugScene & | operator= (DebugScene &&)=delete |
| const Device & | device () const noexcept |
| entt::registry & | registry () |
| const entt::registry & | registry () const |
| template<std::derived_from< IDebugSubSystem > T, typename... Args> | |
| T & | addSystem (entt::hashed_string::hash_type name, Args &&...args) |
| Add a subsystem (IDebugSubSystem) to the scene. | |
| template<std::derived_from< IDebugSubSystem > T> | |
| T * | getSystem (entt::hashed_string::hash_type name) |
| Get a subsystem by key (a hashed string) | |
| template<std::derived_from< IDebugSubSystem > T> | |
| T & | tryGetSystem (entt::hashed_string::hash_type name) |
| std::tuple< entt::entity, DebugMeshComponent & > | addTriad (const Float3 &scale=Float3::Ones()) |
| Just the basic 3D triad. | |
| std::tuple< entt::entity, DebugMeshComponent & > | addLineGrid (const Float4 &color=0xE0A236FF_rgbaf) |
| Add a basic line grid. | |
| std::tuple< entt::entity, DebugMeshComponent & > | addArrow (const Float4 &color=0xEA2502FF_rgbaf) |
| Add an arrow debug entity. | |
| void | update () |
| void | render (CommandBuffer &cmdBuf, const Camera &camera) const |
| void | release () |
| ~DebugScene () | |
Scene for organizing debug entities and render systems.
This implements a basic render system for DebugMeshComponent.
This scene and all subsystems are assumed to use the same shaders and pipelines.
| candlewick::DebugScene::DebugScene | ( | entt::registry & | registry, |
| const RenderContext & | renderer ) |
|
delete |
| candlewick::DebugScene::DebugScene | ( | DebugScene && | other | ) |
|
inline |
| std::tuple< entt::entity, DebugMeshComponent & > candlewick::DebugScene::addArrow | ( | const Float4 & | color = 0xEA2502FF_rgbaf | ) |
Add an arrow debug entity.
| std::tuple< entt::entity, DebugMeshComponent & > candlewick::DebugScene::addLineGrid | ( | const Float4 & | color = 0xE0A236FF_rgbaf | ) |
Add a basic line grid.
| color | Grid color. |
|
inline |
Add a subsystem (IDebugSubSystem) to the scene.
| std::tuple< entt::entity, DebugMeshComponent & > candlewick::DebugScene::addTriad | ( | const Float3 & | scale = Float3::Ones() | ) |
Just the basic 3D triad.
|
inlinenoexcept |
|
inline |
|
inline |
Get a subsystem by key (a hashed string)
| T | The concrete derived type. |
|
delete |
|
delete |
|
inline |
|
inline |
| void candlewick::DebugScene::release | ( | ) |
| void candlewick::DebugScene::render | ( | CommandBuffer & | cmdBuf, |
| const Camera & | camera ) const |
|
inline |
|
inline |