Clutter Engine 0.0.1
|
Utility class for debug drawing of lines, boxes, and spheres in the engine. More...
#include <DebugDraw.h>
Public Member Functions | |
DebugDraw (const DebugDraw &)=delete | |
DebugDraw & | operator= (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 ¢er, 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 ¢er, 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 DebugDraw & | Get () |
Gets the singleton instance of DebugDraw. | |
Utility class for debug drawing of lines, boxes, and spheres in the engine.
Provides static access to draw debug primitives for visualization purposes.
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.
center | Center position of the box. |
extents | Half-extents of the box. |
color | Color of the box. |
lineThickness | Thickness of the box lines. |
rotation | Rotation of the box. |
persistant | If true, the box persists until flushed. |
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.
start | Start position of the line. |
end | End position of the line. |
color | Color of the line. |
lineThickness | Thickness of the line. |
persistant | If true, the line persists until flushed. |
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.
center | Center position of the sphere. |
radius | Radius of the sphere. |
color | Color of the sphere. |
lineThickness | Thickness of the sphere lines. |
persistant | If true, the sphere persists until flushed. |
|
static |