Navigation
API > API/Runtime > API/Runtime/Chaos
A set of debug draw primitives.
NOTE: these are convenient for quick temporary debug draw but it is usually better to create a custom debug draw command with its own data and generating the primitives at render time, rather than capture time. Deferring the primitive generation to render time means that decisions about color, line width etc. can be deferred which is useful for rewinding and changing how objects are displayed.
A debug draw command is a deferred lambda that captures the data required for rendering and uses the IChaosDDRenderer interface to perform rendering. As the command is deferred, make sure all lambda parameters are captured by value, not reference! By convention the Draw function is a static member of a struct, but this is not required.
See the DrawLine implementation for a trivial example. For a less-trivial example see FChaosDDCollisionConstraint, or for a complex example see FChaosDDParticle which supports capture-time and various render-time coloring modes.
| Name | FChaosDDPrimitives |
| Type | struct |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/DebugDraw/DebugDrawPrimitives.h |
| Include Path | #include "Chaos/DebugDraw/DebugDrawPrimitives.h" |
Syntax
struct FChaosDDPrimitives
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DrawArrow
(
const FVector3d& A, |
Chaos/DebugDraw/DebugDrawPrimitives.h | ||
static void DrawBox
(
const FVector3d& Center, |
Chaos/DebugDraw/DebugDrawPrimitives.h | ||
static void DrawCapsule
(
const FVector3d& Center, |
Chaos/DebugDraw/DebugDrawPrimitives.h | ||
static void DrawCircle
(
const FVector3d& Center, |
Chaos/DebugDraw/DebugDrawPrimitives.h | ||
static void DrawLine
(
const FVector3d& A, |
Chaos/DebugDraw/DebugDrawPrimitives.h | ||
static void DrawPoint
(
const FVector3d& Position, |
Chaos/DebugDraw/DebugDrawPrimitives.h | ||
static void DrawSphere
(
const FVector3d& Center, |
Chaos/DebugDraw/DebugDrawPrimitives.h | ||
| Chaos/DebugDraw/DebugDrawPrimitives.h | |||
static void DrawTriangle
(
const FVector3d& A, |
Chaos/DebugDraw/DebugDrawPrimitives.h |