4#include <glm/mat4x4.hpp>
31 constexpr glm::vec4
Red{ 1.0f, 0.0f, 0.0f, 1.0f };
32 constexpr glm::vec4
Green{ 0.0f, 1.0f, 0.0f, 1.0f };
33 constexpr glm::vec4
Blue{ 0.0f, 0.0f, 1.0f, 1.0f };
34 constexpr glm::vec4
Yellow{ 1.0f, 1.0f, 0.0f, 1.0f };
35 constexpr glm::vec4
Cyan{ 0.0f, 1.0f, 1.0f, 1.0f };
36 constexpr glm::vec4
Magenta{ 1.0f, 0.0f, 1.0f, 1.0f };
37 constexpr glm::vec4
White{ 1.0f, 1.0f, 1.0f, 1.0f };
38 constexpr glm::vec4
Orange{ 1.0f, 0.5f, 0.0f, 1.0f };
79 const glm::vec3 & start,
80 const glm::vec3 & end,
92 const glm::vec3 & origin,
93 const glm::vec3 & direction,
106 const glm::vec3 & origin,
107 const glm::vec3 & vec,
117 static void axes(
const glm::vec3 & origin,
float size = 1.0f );
126 const glm::vec3 & position,
138 box(
const glm::vec3 & center,
139 const glm::vec3 & halfExtents,
149 box(
const glm::mat4 & transform,
150 const glm::vec3 & halfExtents,
161 const glm::vec3 & center,
176 const glm::mat4 & transform,
190 const std::vector<glm::vec3> & vertices,
191 const glm::mat4 & transform = glm::mat4( 1.0f ),
203 const std::vector<glm::vec3> & vertices,
204 const std::vector<uint32_t> & indices,
205 const glm::mat4 & transform = glm::mat4( 1.0f ),
217 static void beginFrame( Engine::Rendering::RenderProcess * renderProcess );
238 static void addLine(
const glm::vec3 & start,
const glm::vec3 & end,
const glm::vec4 & color );
Static API for immediate-mode debug line drawing.
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 axes(const glm::vec3 &origin, float size=1.0f)
Draw coordinate axes at a position (RGB = XYZ)
static uint32_t getLastLineCount()
static void addLine(const glm::vec3 &start, const glm::vec3 &end, const glm::vec4 &color)
Internal: add a single line to the buffer.
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 box(const glm::mat4 &transform, const glm::vec3 &halfExtents, const glm::vec4 &color=Colors::Green)
Draw a wireframe box with transform.
static void setCurrentRenderProcess(Engine::Rendering::RenderProcess *renderProcess)
Set the current render process for line accumulation.
static Engine::Rendering::RenderProcess * currentRenderProcess_
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 point(const glm::vec3 &position, float size=0.05f, const glm::vec4 &color=Colors::White)
Draw a point as a small cross.
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 setEnabled(bool enabled)
Enable or disable debug drawing globally.
static void box(const glm::vec3 ¢er, const glm::vec3 &halfExtents, const glm::vec4 &color=Colors::Green)
Draw a wireframe box.
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 beginFrame(Engine::Rendering::RenderProcess *renderProcess)
Called at frame start to clear previous frame's lines.
static uint32_t getLineCapacity()
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 uint32_t getLineCount()
Get the number of lines in the current frame.
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.
Predefined colors for debug visualization.
constexpr glm::vec4 Orange
constexpr glm::vec4 Magenta
constexpr glm::vec4 White
constexpr glm::vec4 Green
constexpr glm::vec4 Yellow
Vertex data for debug line rendering.