Clutter Engine 0.0.1
Loading...
Searching...
No Matches
clt::DebugDraw Class Reference

Utility class for debug drawing of lines, boxes, and spheres in the engine. More...

#include <DebugDraw.h>

Public Member Functions

 DebugDraw (const DebugDraw &)=delete
 
DebugDrawoperator= (const DebugDraw &)=delete
 
void DrawLine (const Vector3 &start, const Vector3 &end, const Color &color=Color::Red, float lineThickness=1, bool persistant=false)
 Draws a line in the scene.
 
void DrawBox (const Vector3 &center, const Vector3 &extents, const Color &color=Color::Red, float lineThickness=1, const Quaternion &rotation=Quaternion::Identity, bool persistant=false)
 Draws a box in the scene.
 
void DrawSphere (const Vector3 &center, float radius, const Color &color=Color::Red, float lineThickness=1, bool persistant=false)
 Draws a sphere in the scene.
 
void FlushPersistantDraw ()
 Flushes all persistent debug primitives.
 
void FlushPersistantLines ()
 Flushes all persistent lines.
 
void FlushPersistantBoxes ()
 Flushes all persistent boxes.
 
void FlushPersistantSpheres ()
 Flushes all persistent spheres.
 

Static Public Member Functions

static DebugDrawGet ()
 Gets the singleton instance of DebugDraw.
 

Detailed Description

Utility class for debug drawing of lines, boxes, and spheres in the engine.

Provides static access to draw debug primitives for visualization purposes.

Member Function Documentation

◆ DrawBox()

void DebugDraw::DrawBox ( const Vector3 & center,
const Vector3 & extents,
const Color & color = Color::Red,
float lineThickness = 1,
const Quaternion & rotation = Quaternion::Identity,
bool persistant = false )

Draws a box in the scene.

Parameters
centerCenter position of the box.
extentsHalf-extents of the box.
colorColor of the box.
lineThicknessThickness of the box lines.
rotationRotation of the box.
persistantIf true, the box persists until flushed.

◆ DrawLine()

void DebugDraw::DrawLine ( const Vector3 & start,
const Vector3 & end,
const Color & color = Color::Red,
float lineThickness = 1,
bool persistant = false )

Draws a line in the scene.

Parameters
startStart position of the line.
endEnd position of the line.
colorColor of the line.
lineThicknessThickness of the line.
persistantIf true, the line persists until flushed.

◆ DrawSphere()

void DebugDraw::DrawSphere ( const Vector3 & center,
float radius,
const Color & color = Color::Red,
float lineThickness = 1,
bool persistant = false )

Draws a sphere in the scene.

Parameters
centerCenter position of the sphere.
radiusRadius of the sphere.
colorColor of the sphere.
lineThicknessThickness of the sphere lines.
persistantIf true, the sphere persists until flushed.

◆ Get()

DebugDraw & DebugDraw::Get ( )
static

Gets the singleton instance of DebugDraw.

Returns
Reference to the DebugDraw instance.

The documentation for this class was generated from the following files: