|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
Static API for immediate-mode debug line drawing. More...
#include <DebugDraw.h>
Static Public Member Functions | |
| static void | setEnabled (bool enabled) |
| Enable or disable debug drawing globally. | |
| static bool | isEnabled () |
| Check if debug drawing is currently enabled. | |
| static void | line (const glm::vec3 &start, const glm::vec3 &end, const glm::vec4 &color=Colors::White) |
| Draw a line between two points. | |
| static void | arrow (const glm::vec3 &origin, const glm::vec3 &direction, const glm::vec4 &color=Colors::White, float headSize=0.1f) |
| Draw an arrow from origin in the given direction. | |
| static void | vector (const glm::vec3 &origin, const glm::vec3 &vec, const glm::vec4 &color=Colors::White, float scale=1.0f) |
| Draw a vector from origin (alias for arrow with scale) | |
| static void | axes (const glm::vec3 &origin, float size=1.0f) |
| Draw coordinate axes at a position (RGB = XYZ) | |
| static void | point (const glm::vec3 &position, float size=0.05f, const glm::vec4 &color=Colors::White) |
| Draw a point as a small cross. | |
| static void | box (const glm::vec3 ¢er, const glm::vec3 &halfExtents, const glm::vec4 &color=Colors::Green) |
| Draw a wireframe box. | |
| static void | box (const glm::mat4 &transform, const glm::vec3 &halfExtents, const glm::vec4 &color=Colors::Green) |
| Draw a wireframe box with transform. | |
| static void | sphere (const glm::vec3 ¢er, float radius, const glm::vec4 &color=Colors::Green, int segments=16) |
| Draw a wireframe sphere (approximated with circles) | |
| static void | capsule (const glm::mat4 &transform, float radius, float height, const glm::vec4 &color=Colors::Green, int segments=16) |
| Draw a wireframe capsule (cylinder with hemispherical ends) | |
| static void | convexHull (const std::vector< glm::vec3 > &vertices, const glm::mat4 &transform=glm::mat4(1.0f), const glm::vec4 &color=Colors::Cyan) |
| Draw a convex hull from vertices. | |
| static void | triangleMesh (const std::vector< glm::vec3 > &vertices, const std::vector< uint32_t > &indices, const glm::mat4 &transform=glm::mat4(1.0f), const glm::vec4 &color=Colors::Cyan) |
| Draw a triangle mesh wireframe. | |
| static void | beginFrame (Engine::Rendering::RenderProcess *renderProcess) |
| Called at frame start to clear previous frame's lines. | |
| static void | setCurrentRenderProcess (Engine::Rendering::RenderProcess *renderProcess) |
| Set the current render process for line accumulation. | |
| static uint32_t | getLineCount () |
| Get the number of lines in the current frame. | |
| static uint32_t | getLastLineCount () |
| static uint32_t | getLineCapacity () |
Static Private Member Functions | |
| static void | addLine (const glm::vec3 &start, const glm::vec3 &end, const glm::vec4 &color) |
| Internal: add a single line to the buffer. | |
Static Private Attributes | |
| static bool | enabled_ |
| static Engine::Rendering::RenderProcess * | currentRenderProcess_ |
Static API for immediate-mode debug line drawing.
Lines are rendered after scene geometry in Pass 2, depth-tested against the scene but not writing to depth. All lines are automatically cleared at the start of each frame.
Usage: DebugDraw::line(start, end, DebugColors::Red); DebugDraw::arrow(origin, direction, DebugColors::Green); DebugDraw::axes(position, 0.5f);
Definition at line 53 of file DebugDraw.h.
|
staticprivate |
Internal: add a single line to the buffer.
|
static |
Draw an arrow from origin in the given direction.
| origin | Starting point in world space |
| direction | Direction vector (not normalized - length determines arrow length) |
| color | Arrow color (default: white) |
| headSize | Size of arrowhead relative to direction length (default: 0.1) |
References Engine::Debug::Rendering::Colors::White.
|
static |
Draw coordinate axes at a position (RGB = XYZ)
| origin | Center position in world space |
| size | Length of each axis (default: 1.0) |
|
static |
Called at frame start to clear previous frame's lines.
| renderProcess | Current render process |
|
static |
Draw a wireframe box with transform.
| transform | World transform matrix |
| halfExtents | Half-size in each axis (local space) |
| color | Box color (default: green) |
References Engine::Debug::Rendering::Colors::Green.
|
static |
Draw a wireframe box.
| center | Center of the box in world space |
| halfExtents | Half-size in each axis |
| color | Box color (default: green) |
References Engine::Debug::Rendering::Colors::Green.
|
static |
Draw a wireframe capsule (cylinder with hemispherical ends)
| transform | World transform matrix (capsule aligned along local Y axis) |
| radius | Capsule radius |
| height | Height of the cylindrical portion |
| color | Capsule color (default: green) |
| segments | Number of segments per circle (default: 16) |
References Engine::Debug::Rendering::Colors::Green.
|
static |
Draw a convex hull from vertices.
| vertices | Array of vertex positions |
| transform | World transform to apply |
| color | Hull color (default: cyan) |
References Engine::Debug::Rendering::Colors::Cyan.
|
static |
|
static |
|
static |
Get the number of lines in the current frame.
|
static |
Check if debug drawing is currently enabled.
|
static |
Draw a line between two points.
| start | Starting point in world space |
| end | Ending point in world space |
| color | Line color (default: white) |
References Engine::Debug::Rendering::Colors::White.
|
static |
Draw a point as a small cross.
| position | Point position in world space |
| size | Size of the cross (default: 0.05) |
| color | Point color (default: white) |
References Engine::Debug::Rendering::Colors::White.
|
static |
Set the current render process for line accumulation.
| renderProcess | Current render process |
|
static |
Enable or disable debug drawing globally.
| enabled | true to enable, false to disable |
|
static |
Draw a wireframe sphere (approximated with circles)
| center | Center of the sphere in world space |
| radius | Sphere radius |
| color | Sphere color (default: green) |
| segments | Number of segments per circle (default: 16) |
References Engine::Debug::Rendering::Colors::Green.
|
static |
Draw a triangle mesh wireframe.
| vertices | Array of vertex positions |
| indices | Triangle indices |
| transform | World transform to apply |
| color | Mesh color (default: cyan) |
References Engine::Debug::Rendering::Colors::Cyan.
|
static |
Draw a vector from origin (alias for arrow with scale)
| origin | Starting point in world space |
| vec | Vector to draw |
| color | Vector color (default: white) |
| scale | Scale factor for the vector (default: 1.0) |
References Engine::Debug::Rendering::Colors::White.
|
staticprivate |
Definition at line 241 of file DebugDraw.h.
|
staticprivate |
Definition at line 240 of file DebugDraw.h.