class

DebugDraw

Module
DebugDraw
Header
#include "Tools/DebugDraw.h"
Namespace
Mowo

Constructors

SignatureNameDescription
DebugDraw(const DebugDraw&) = deleteDebugDraw

Public functions

ReturnsNameDescription
DebugDraw&Get
const std::vector<FDebugDrawCategoryInfo>&Categories
boolIsCategoryEnabled
voidSetCategoryEnabled
uint32_tGetCategoryMask
voidSetActiveCategory
EDebugDrawCategoryGetActiveCategory
DebugDraw&operator=
voidDrawLineDrawing primitives (call from main thread during update)
voidDrawRay
voidDrawArrow
voidDrawBox
voidDrawBox
voidDrawSphere
voidDrawCapsule
voidDrawCircle
voidDrawArc
voidDrawGrid
voidSetDepthTestEnabledDepth test toggle (for subsequent draw calls)
boolIsDepthTestEnabled
voidDrawLineWithDepthTest
voidDrawLinesWithDepthTest
voidDrawThickLineThe line batcher.
voidDrawThickPolyline
voidDrawThickCircle
voidDrawScreenPointA round dot of constant screen size: a zero-length segment, whose round caps are the dot.
voidDrawSolidTriangle
voidDrawThickBoxThick versions of the shapes above, for component visualisers.
voidDrawThickSphere
voidDrawThickCapsuleY-up capsule: halfHeight is the cylinder's, the caps extend past it.
voidDrawThickFrustumThe eight corners of NDC depth 0..1 through the inverse.
voidDrawThickConeA spot light's cone: base circle of radius tan(halfAngle) * length and four edges from the apex.
voidDrawThickArrow
voidClearPersistent
size_tGetPersistentCount
voidEndFrameSwap buffers: main thread calls EndFrame(), render thread reads back buffer
const std::vector<DebugDrawVertex>&GetRenderVerticesGet vertices for rendering (call from render thread)
const std::vector<DebugDrawVertex>&GetRenderVerticesNoDepth
boolHasVertices
boolHasVerticesNoDepth
const std::vector<FDebugPrimitive>&GetRenderPrimitives
const std::vector<FDebugPrimitive>&GetPendingPrimitivesThe primitives recorded since the last EndFrame, before the swap — what a test inspects to see what one call emitted.
voidSetEnabled
boolIsEnabled
FDebugPrimitiveMakeSegment
FDebugPrimitiveMakeTriangle

Function details

DebugDraw

C++
DebugDraw(const DebugDraw&) = delete

Get

C++
static DebugDraw& Get()

Categories

C++
static const std::vector<FDebugDrawCategoryInfo>& Categories()

IsCategoryEnabled

C++
bool IsCategoryEnabled(EDebugDrawCategory category) const

SetCategoryEnabled

C++
void SetCategoryEnabled(EDebugDrawCategory category, bool enabled)

GetCategoryMask

C++
uint32_t GetCategoryMask() const

SetActiveCategory

C++
void SetActiveCategory(EDebugDrawCategory category)

GetActiveCategory

C++
EDebugDrawCategory GetActiveCategory() const

operator=

C++
DebugDraw& operator=(const DebugDraw&) = delete

DrawLine

C++
void DrawLine(const Vec3& a, const Vec3& b, const Vec4& color = Vec4(1, 1, 1, 1))

Drawing primitives (call from main thread during update)

DrawRay

C++
void DrawRay(const Vec3& origin, const Vec3& direction, float length, const Vec4& color = Vec4(1, 1, 0, 1))

DrawArrow

C++
void DrawArrow(const Vec3& from, const Vec3& to, const Vec4& color = Vec4(1, 1, 0, 1), float headSize = 0.15f)

DrawBox

C++
void DrawBox(const Vec3& center, const Vec3& extents, const Vec4& color = Vec4(0, 1, 0, 1))

DrawBox

C++
void DrawBox(const Vec3& center, const Vec3& extents, const Mat4& rotation, const Vec4& color = Vec4(0, 1, 0, 1))

DrawSphere

C++
void DrawSphere(const Vec3& center, float radius, const Vec4& color = Vec4(0, 0.5f, 1, 1), int segments = 16)

DrawCapsule

C++
void DrawCapsule(const Vec3& center, float radius, float halfHeight, const Vec4& color = Vec4(0, 0.5f, 1, 1), int segments = 12)

DrawCircle

C++
void DrawCircle(const Vec3& center, const Vec3& normal, float radius, const Vec4& color = Vec4(1, 1, 1, 1), int segments = 32)

DrawArc

C++
void DrawArc(const Vec3& center, const Vec3& direction, const Vec3& up, float radius, float halfAngleDeg, const Vec4& color = Vec4(1, 1, 1, 1), int segments = 24)

DrawGrid

C++
void DrawGrid(float size, int divisions, const Vec4& color = Vec4(0.3f, 0.3f, 0.3f, 1.0f))

SetDepthTestEnabled

C++
void SetDepthTestEnabled(bool enabled)

Depth test toggle (for subsequent draw calls)

IsDepthTestEnabled

C++
bool IsDepthTestEnabled() const

DrawLineWithDepthTest

C++
void DrawLineWithDepthTest(const Vec3& a, const Vec3& b, const Vec4& color, bool depthTest)

DrawLinesWithDepthTest

C++
void DrawLinesWithDepthTest(const std::vector<DebugDrawVertex>& vertices, bool depthTest)

DrawThickLine

C++
void DrawThickLine(const Vec3& a, const Vec3& b, const Vec4& color, const FDebugLineStyle& style)

The line batcher. DrawLine above stays the cheap one-pixel path for bulk debug geometry (a navmesh is hundreds of thousands of edges); these are the anti-aliased, screen-space-thick primitives the editor's own overlays draw with, batched into one stream per depth priority and drawn after the selection outline.

DrawThickPolyline

C++
void DrawThickPolyline(const Vec3* points, uint32_t count, bool closed, const Vec4& color, const FDebugLineStyle& style)

DrawThickCircle

C++
void DrawThickCircle(const Vec3& center, const Vec3& normal, float radius, const Vec4& color, const FDebugLineStyle& style, int32_t segments = 48)

DrawScreenPoint

C++
void DrawScreenPoint(const Vec3& position, float diameterPx, const Vec4& color, const FDebugLineStyle& style)

A round dot of constant screen size: a zero-length segment, whose round caps are the dot.

DrawSolidTriangle

C++
void DrawSolidTriangle(const Vec3& a, const Vec3& b, const Vec3& c, const Vec4& color, EDebugDepthPriority priority, float lifetime = 0.0f)

DrawThickBox

C++
void DrawThickBox(const Vec3& center, const Vec3& extents, const Mat4& rotation, const Vec4& color, const FDebugLineStyle& style)

Thick versions of the shapes above, for component visualisers.

DrawThickSphere

C++
void DrawThickSphere(const Vec3& center, float radius, const Vec4& color, const FDebugLineStyle& style, int32_t segments = 32)

DrawThickCapsule

C++
void DrawThickCapsule(const Vec3& center, float radius, float halfHeight, const Vec4& color, const FDebugLineStyle& style, int32_t segments = 24)

Y-up capsule: halfHeight is the cylinder's, the caps extend past it.

DrawThickFrustum

C++
void DrawThickFrustum(const Mat4& viewProj, const Vec4& color, const FDebugLineStyle& style)

The eight corners of NDC depth 0..1 through the inverse.

DrawThickCone

C++
void DrawThickCone(const Vec3& apex, const Vec3& direction, float length, float halfAngleDeg, const Vec4& color, const FDebugLineStyle& style, int32_t segments = 32)

A spot light's cone: base circle of radius tan(halfAngle) * length and four edges from the apex.

DrawThickArrow

C++
void DrawThickArrow(const Vec3& from, const Vec3& to, const Vec4& color, const FDebugLineStyle& style, float headSize = 0.15f)

ClearPersistent

C++
void ClearPersistent()

GetPersistentCount

C++
size_t GetPersistentCount() const

EndFrame

C++
void EndFrame()

Swap buffers: main thread calls EndFrame(), render thread reads back buffer

GetRenderVertices

C++
const std::vector<DebugDrawVertex>& GetRenderVertices() const

Get vertices for rendering (call from render thread)

GetRenderVerticesNoDepth

C++
const std::vector<DebugDrawVertex>& GetRenderVerticesNoDepth() const

HasVertices

C++
bool HasVertices() const

HasVerticesNoDepth

C++
bool HasVerticesNoDepth() const

GetRenderPrimitives

C++
const std::vector<FDebugPrimitive>& GetRenderPrimitives(EDebugDepthPriority priority) const

GetPendingPrimitives

C++
const std::vector<FDebugPrimitive>& GetPendingPrimitives(EDebugDepthPriority priority) const

The primitives recorded since the last EndFrame, before the swap — what a test inspects to see what one call emitted.

SetEnabled

C++
void SetEnabled(bool enabled)

IsEnabled

C++
bool IsEnabled() const

MakeSegment

C++
static FDebugPrimitive MakeSegment(const Vec3& a, const Vec3& b, const Vec4& color, float thicknessPx, float haloPx)

MakeTriangle

C++
static FDebugPrimitive MakeTriangle(const Vec3& a, const Vec3& b, const Vec3& c, const Vec4& color)
Generated from Tools/DebugDraw.h via debugdraw.json · Oct 26, 2026Version 1.0.0