SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::DebugLineRenderer Class Reference

#include <DebugLineRenderer.hpp>

Static Public Member Functions

static void DrawAABB (const Physics::AABB &aabb, float r, float g, float b, float a=1.0f)
 Queues a wireframe box outline.
static void DrawCapsule (const Physics::BoundingCapsule &capsule, float r, float g, float b, float a=1.0f, int segments=16)
 Queues a wireframe capsule outline.
static void DrawLine (const Math::Vector3D &start, const Math::Vector3D &end, float r, float g, float b, float a=1.0f)
 Queues a single line segment for the next Flush.
static void DrawSphere (const Math::Vector3D &center, float radius, float r, float g, float b, float a=1.0f, int segments=16)
 Queues a wireframe sphere approximated with segments latitude/longitude rings.
static void Flush (Camera *camera)
 Uploads all queued lines and draws them in one pass, then clears the queue.
static void Initialize ()
 Allocates the shared vertex buffer, shader, and constant buffer.
static bool IsEnabled ()
static void SetEnabled (bool enabled)
static void Shutdown ()

Detailed Description

Immediate-mode wireframe line drawing for debug visualization; lines queue up and are flushed once per frame.

Definition at line 18 of file DebugLineRenderer.hpp.

Member Function Documentation

◆ DrawAABB()

void Sleak::DebugLineRenderer::DrawAABB ( const Physics::AABB & aabb,
float r,
float g,
float b,
float a = 1.0f )
static

Queues a wireframe box outline.

Definition at line 81 of file DebugLineRenderer.cpp.

◆ DrawCapsule()

void Sleak::DebugLineRenderer::DrawCapsule ( const Physics::BoundingCapsule & capsule,
float r,
float g,
float b,
float a = 1.0f,
int segments = 16 )
static

Queues a wireframe capsule outline.

Definition at line 160 of file DebugLineRenderer.cpp.

◆ DrawLine()

void Sleak::DebugLineRenderer::DrawLine ( const Math::Vector3D & start,
const Math::Vector3D & end,
float r,
float g,
float b,
float a = 1.0f )
static

Queues a single line segment for the next Flush.

Definition at line 65 of file DebugLineRenderer.cpp.

◆ DrawSphere()

void Sleak::DebugLineRenderer::DrawSphere ( const Math::Vector3D & center,
float radius,
float r,
float g,
float b,
float a = 1.0f,
int segments = 16 )
static

Queues a wireframe sphere approximated with segments latitude/longitude rings.

Definition at line 115 of file DebugLineRenderer.cpp.

◆ Flush()

void Sleak::DebugLineRenderer::Flush ( Camera * camera)
static

Uploads all queued lines and draws them in one pass, then clears the queue.

Definition at line 192 of file DebugLineRenderer.cpp.

◆ Initialize()

void Sleak::DebugLineRenderer::Initialize ( )
static

Allocates the shared vertex buffer, shader, and constant buffer.

Definition at line 24 of file DebugLineRenderer.cpp.

◆ IsEnabled()

bool Sleak::DebugLineRenderer::IsEnabled ( )
inlinestatic

Definition at line 25 of file DebugLineRenderer.hpp.

◆ SetEnabled()

void Sleak::DebugLineRenderer::SetEnabled ( bool enabled)
inlinestatic

Definition at line 24 of file DebugLineRenderer.hpp.

◆ Shutdown()

void Sleak::DebugLineRenderer::Shutdown ( )
static

Definition at line 56 of file DebugLineRenderer.cpp.