IPersistantDebug

IPersistantDebugabstract

#include

Public Member Functions

virtual void Begin (const char *szName, bool clear)=0
virtual void AddSphere (const Vec3 &pos, float radius, ColorF clr, float timeout)=0
virtual void AddDirection (const Vec3 &pos, float radius, const Vec3 &dir, ColorF clr, float timeout)=0
virtual void AddLine (const Vec3 &pos1, const Vec3 &pos2, ColorF clr, float timeout)=0
virtual void AddPlanarDisc (const Vec3 &pos, float innerRadius, float outerRadius, ColorF clr, float timeout)=0
virtual void AddCone (const Vec3 &pos, const Vec3 &dir, float baseRadius, float height, ColorF clr, float timeout)=0
virtual void AddCylinder (const Vec3 &pos, const Vec3 &dir, float radius, float height, ColorF clr, float timeout)=0
virtual void Add2DText (const char *szText, float size, ColorF clr, float timeout)=0
virtual void AddText (float x, float y, float size, ColorF clr, float timeout, const char *fmt,...)=0
virtual void AddText3D (const Vec3 &pos, float size, ColorF clr, float timeout, const char *fmt,...)=0
virtual void Add2DLine (float x1, float y1, float x2, float y2, ColorF clr, float timeout)=0
virtual void AddQuat (const Vec3 &pos, const Quat &q, float r, ColorF clr, float timeout)=0
virtual void AddAABB (const Vec3 &min, const Vec3 &max, ColorF clr, float timeout)=0
virtual void AddEntityTag (const SEntityTagParams &params, const char *tagContext="")=0
virtual void ClearEntityTags (EntityId entityId)=0
Clears all entity tags for the specified entity.
virtual void ClearStaticTag (EntityId entityId, const char *staticId)=0
Clears a specific tag for the specified entity.
virtual void ClearTagContext (const char *tagContext)=0
Clears all entity tags by context.
virtual void ClearTagContext (const char *tagContext, EntityId entityId)=0
Clears all entity tags by context, for a specific entity instance.
virtual void Update (float frameTime)=0
virtual void PostUpdate (float frameTime)=0
virtual void Reset ()=0

Detailed Description

Persistent debug exposes functionality for drawing debug geometry over a specific period of time, without having to continuously re-render manually each frmae. This can be extremely useful to debug gameplay logic.

Member Function Documentation

◆ Add2DLine()

virtual void IPersistantDebug::Add2DLine ( float x1,
float y1,
float x2,
float y2,
ColorF clr,
float timeout
)
pure virtual

Adds a 2D line on screen

Parameters
x1X axis coordinate in screen space where the line starts
y1Y axis coordinate in screen space where the line starts
x2X axis coordinate in screen space where the line ends
y2Y axis coordinate in screen space where the line ends
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ Add2DText()

virtual void IPersistantDebug::Add2DText ( const char * szText,
float size,
ColorF clr,
float timeout
)
pure virtual

Adds 2D text on screen

Parameters
szTextText message to draw
sizeSize of the text
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddAABB()

virtual void IPersistantDebug::AddAABB ( const Vec3 & min,
const Vec3 & max,
ColorF clr,
float timeout
)
pure virtual

Adds an axis-aligned bounding box

Parameters
minStarting coordinates of the bounding box
minEnd coordinates of the bounding box
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddCone()

virtual void IPersistantDebug::AddCone ( const Vec3 & pos,
const Vec3 & dir,
float baseRadius,
float height,
ColorF clr,
float timeout
)
pure virtual
Parameters
posThe world coordinates to draw this object at
dirThe direction in which the cone will point
baseRadiusRadius of the cone at its base
heightHeight of the cone
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddCylinder()

virtual void IPersistantDebug::AddCylinder ( const Vec3 & pos,
const Vec3 & dir,
float radius,
float height,
ColorF clr,
float timeout
)
pure virtual

Adds a cylinder at the specified coordinates

Parameters
posThe world coordinates to draw this object at
dirDirection in which the cylinder will point
radiusRadius of the cylinder
heightHeight of the cylinder
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddDirection()

virtual void IPersistantDebug::AddDirection ( const Vec3 & pos,
float radius,
const Vec3 & dir,
ColorF clr,
float timeout
)
pure virtual

Adds a persistent direction indicator at the specified location

Parameters
posThe world coordinates to draw this object at
radiusRadius of the directional indicator
dirDirectional vector we want to visualize
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddEntityTag()

virtual void IPersistantDebug::AddEntityTag ( const SEntityTagParams & params,
const char * tagContext = ""
)
pure virtual

Adds a tag above the specified entity, using the specified parameters

Parameters
paramsParameters describing the tag
Thecontext in which we'll add the tag

◆ AddLine()

virtual void IPersistantDebug::AddLine ( const Vec3 & pos1,
const Vec3 & pos2,
ColorF clr,
float timeout
)
pure virtual

Adds a persistent line at the specified coordinates

Parameters
pos1Origin of the line, in world coordinates
pos2End point of the line, in world coordinates
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddPlanarDisc()

virtual void IPersistantDebug::AddPlanarDisc ( const Vec3 & pos,
float innerRadius,
float outerRadius,
ColorF clr,
float timeout
)
pure virtual

Adds a planar disc to the specified coordinates

Parameters
posThe world coordinates to draw this object at
innerRadiusThe inner radius of the disc
outerRadiusThe outer radius of the disc
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddQuat()

virtual void IPersistantDebug::AddQuat ( const Vec3 & pos,
const Quat & q,
float r,
ColorF clr,
float timeout
)
pure virtual

Adds a visualized quaternion to the specified coordinates

Parameters
posThe world coordinates to draw this object at
qThe quaternion to visualize
rRadius of the helper
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddSphere()

virtual void IPersistantDebug::AddSphere ( const Vec3 & pos,
float radius,
ColorF clr,
float timeout
)
pure virtual

Adds a persistent sphere at the specified location

Parameters
posThe world coordinates to draw this object at
radiusRadius of the sphere
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering

◆ AddText()

virtual void IPersistantDebug::AddText ( float x,
float y,
float size,
ColorF clr,
float timeout,
const char * fmt,
...
)
pure virtual

Adds 2D text to the specified screen coordinates

Parameters
xX axis coordinate in screen space
yY axis coordinate in screen space
sizeSize of the text
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering
fmt...printf style text message to be drawn on screen

◆ AddText3D()

virtual void IPersistantDebug::AddText3D ( const Vec3 & pos,
float size,
ColorF clr,
float timeout,
const char * fmt,
...
)
pure virtual

Adds 3D text to the specified world coordinates

Parameters
posThe world coordinates to draw this object at
sizeSize of the text
clrColor of the debug geometry
timeoutTimeout in seconds after which the item will stop rendering
fmt...printf style text message to be drawn on screen

◆ Begin()

virtual void IPersistantDebug::Begin ( const char * szName,
bool clear
)
pure virtual

Starts a persistent debug drawing group It is mandatory to call this function before invoking any of the Add* functions!

Parameters
szNameThe name of the group
clearWhether or not to clear any persistent drawing done to the specified group before