Vertices Engine  v1.9.2.92
A Cross Platform game engine developed by Virtex Edge Design.
Loading...
Searching...
No Matches
VerticesEngine.vxDebug Class Reference

A system for handling rendering of various debug shapes. More...

Static Public Member Functions

static void Init ()
 Initializes the renderer.
 
static void RetreiveDebugMethods (Assembly assembly)
 Gets all static methods which have the 'vxDebugMethodAttribute' flag and registers them with the Debug UI.
 
static void DumpError (Exception exception, string errorInfo, int depth=0)
 
static void Log (object logObj, [CallerMemberName] string caller="")
 A generic log message.
 
static void LogIO (object logObj, [CallerMemberName] string caller="")
 
static void LogNet (object logObj, [CallerMemberName] string caller="")
 A Network Specific Log message.
 
static void Warn (object logObj, [CallerMemberName] string caller="")
 Log a warning.
 
static void Error (object logObj, [CallerMemberName] string caller="")
 Log an error.
 
static void Exception (Exception ex, [CallerMemberName] string caller="")
 
static void DrawRay (Ray ray, Color color)
 
static void DrawRay (Vector3 point, Vector3 dir, Color color)
 
static void DrawLine (Vector2 a, Vector2 b, Color color)
 
static void DrawLine (Vector3 a, Vector3 b, Color color)
 Adds a line to be rendered for just one frame.
 
static void DrawLine (Vector3 a, Vector3 b, Color color, float life)
 Adds a line to be rendered for a set amount of time.
 
static void DrawTriangle (Vector3 a, Vector3 b, Vector3 c, Color color)
 Adds a triangle to be rendered for just one frame.
 
static void DrawTriangle (Vector3 a, Vector3 b, Vector3 c, Color color, float life)
 Adds a triangle to be rendered for a set amount of time.
 
static void DrawTransform (vxTransform transform)
 Draws a transform using a RGB Gizmo.
 
static void DrawTransform (vxTransform transform, float l)
 Draws a transform using a RGB Gizmo.
 
static void DrawTransform (vxTransform transform, float l, Color tagColour)
 Draws a transform using a RGB Gizmo.
 
static void DrawTransform (Matrix matrix)
 Draws a transform using a RGB Gizmo.
 
static void DrawTransform (Matrix matrix, float l)
 Draws a transform using a RGB Gizmo.
 
static void DrawTransform (Matrix matrix, float l, Color tagColour)
 Draws a transform using a RGB Gizmo.
 
static void DrawBoundingFrustum (BoundingFrustum frustum, Color color)
 Adds a frustum to be rendered for just one frame.
 
static void DrawBoundingFrustum (BoundingFrustum frustum, Color color, float life)
 Adds a frustum to be rendered for a set amount of time.
 
static void DrawBoundingBox (BoundingBox box, Color color)
 Adds a bounding box to be rendered for just one frame.
 
static void DrawBoundingBox (BoundingBox box, Color color, float life)
 Adds a bounding box to be rendered for a set amount of time.
 
static void DrawBoundingSphere (Vector3 center, float radius, Color color)
 Adds a bounding sphere to be rendered for just one frame.
 
static void DrawBoundingSphere (BoundingSphere sphere, Color color)
 Adds a bounding sphere to be rendered for just one frame.
 
static void DrawBoundingSphere (BoundingSphere sphere, Color color, float life)
 Adds a bounding sphere to be rendered for a set amount of time.
 
static void AddDebugTool (vxDebugUIControlBaseClass tool)
 
static vxDebugUIControlBaseClass GetDebugControl (Type type)
 
static void InitialiseTool ()
 

Static Public Attributes

static bool IsGameStatusConsoleVisible = false
 Game Status Console is a list of constant updating info.
 
static bool IsDebugOutputVerbose = false
 Is debug output verbose. This can be set by running the app with the '-v' flag.
 

Properties

static bool IsDebugMeshVisible [get, set]
 Is the Debug Mesh Visible.
 
static bool IsDebugRenderTargetsVisible [get, set]
 Is the Debug Render Targets Visible.
 
static vxDebugCommandUI CommandUI [get]
 Is output Verbose.
 

Detailed Description

A system for handling rendering of various debug shapes.

DebugSystem is a helper class that streamlines the creation of the various GameDebug pieces. While games are free to add only the pieces they care about, DebugSystem allows games to quickly create and add all the components by calling the Initialize method.

The DebugShapeRenderer allows for rendering line-base shapes in a batched fashion. Games will call one of the many Add* methods to add a shape to the renderer and then a call to Draw will cause all shapes to be rendered. This mechanism was chosen because it allows game code to call the Add* methods wherever is most convenient, rather than having to add draw methods to all of the necessary objects.

Additionally the renderer supports a lifetime for all shapes added. This allows for things like visualization of raycast bullets. The game would call the AddLine overload with the lifetime parameter and pass in a positive value. The renderer will then draw that shape for the given amount of time without any more calls to AddLine being required.

The renderer's batching mechanism uses a cache system to avoid garbage and also draws as many lines in one call to DrawUserPrimitives as possible. If the renderer is trying to draw more lines than are allowed in the Reach profile, it will break them up into multiple draw calls to make sure the game continues to work for any game.

Member Function Documentation

◆ DrawBoundingBox() [1/2]

static void VerticesEngine.vxDebug.DrawBoundingBox ( BoundingBox box,
Color color )
static

Adds a bounding box to be rendered for just one frame.

Parameters
boxThe bounding box to render.
colorThe color in which to draw the bounding box.

◆ DrawBoundingBox() [2/2]

static void VerticesEngine.vxDebug.DrawBoundingBox ( BoundingBox box,
Color color,
float life )
static

Adds a bounding box to be rendered for a set amount of time.

Parameters
boxThe bounding box to render.
colorThe color in which to draw the bounding box.
lifeThe amount of time, in seconds, to keep rendering the bounding box.

◆ DrawBoundingFrustum() [1/2]

static void VerticesEngine.vxDebug.DrawBoundingFrustum ( BoundingFrustum frustum,
Color color )
static

Adds a frustum to be rendered for just one frame.

Parameters
frustumThe frustum to render.
colorThe color in which to draw the frustum.

◆ DrawBoundingFrustum() [2/2]

static void VerticesEngine.vxDebug.DrawBoundingFrustum ( BoundingFrustum frustum,
Color color,
float life )
static

Adds a frustum to be rendered for a set amount of time.

Parameters
frustumThe frustum to render.
colorThe color in which to draw the frustum.
lifeThe amount of time, in seconds, to keep rendering the frustum.

◆ DrawBoundingSphere() [1/3]

static void VerticesEngine.vxDebug.DrawBoundingSphere ( BoundingSphere sphere,
Color color )
static

Adds a bounding sphere to be rendered for just one frame.

Parameters
sphereThe bounding sphere to render.
colorThe color in which to draw the bounding sphere.

◆ DrawBoundingSphere() [2/3]

static void VerticesEngine.vxDebug.DrawBoundingSphere ( BoundingSphere sphere,
Color color,
float life )
static

Adds a bounding sphere to be rendered for a set amount of time.

Parameters
sphereThe bounding sphere to render.
colorThe color in which to draw the bounding sphere.
lifeThe amount of time, in seconds, to keep rendering the bounding sphere.

◆ DrawBoundingSphere() [3/3]

static void VerticesEngine.vxDebug.DrawBoundingSphere ( Vector3 center,
float radius,
Color color )
static

Adds a bounding sphere to be rendered for just one frame.

Parameters
center
radius
color

◆ DrawLine() [1/2]

static void VerticesEngine.vxDebug.DrawLine ( Vector3 a,
Vector3 b,
Color color )
static

Adds a line to be rendered for just one frame.

Parameters
aThe first point of the line.
bThe second point of the line.
colorThe color in which to draw the line.

◆ DrawLine() [2/2]

static void VerticesEngine.vxDebug.DrawLine ( Vector3 a,
Vector3 b,
Color color,
float life )
static

Adds a line to be rendered for a set amount of time.

Parameters
aThe first point of the line.
bThe second point of the line.
colorThe color in which to draw the line.
lifeThe amount of time, in seconds, to keep rendering the line.

◆ DrawTransform() [1/6]

static void VerticesEngine.vxDebug.DrawTransform ( Matrix matrix)
static

Draws a transform using a RGB Gizmo.

Parameters
transform

◆ DrawTransform() [2/6]

static void VerticesEngine.vxDebug.DrawTransform ( Matrix matrix,
float l )
static

Draws a transform using a RGB Gizmo.

Parameters
transform
l

◆ DrawTransform() [3/6]

static void VerticesEngine.vxDebug.DrawTransform ( Matrix matrix,
float l,
Color tagColour )
static

Draws a transform using a RGB Gizmo.

Parameters
matrix
l
tagColour

◆ DrawTransform() [4/6]

static void VerticesEngine.vxDebug.DrawTransform ( vxTransform transform)
static

Draws a transform using a RGB Gizmo.

Parameters
transform

◆ DrawTransform() [5/6]

static void VerticesEngine.vxDebug.DrawTransform ( vxTransform transform,
float l )
static

Draws a transform using a RGB Gizmo.

Parameters
transform
l

◆ DrawTransform() [6/6]

static void VerticesEngine.vxDebug.DrawTransform ( vxTransform transform,
float l,
Color tagColour )
static

Draws a transform using a RGB Gizmo.

Parameters
transform
l
tagColour

◆ DrawTriangle() [1/2]

static void VerticesEngine.vxDebug.DrawTriangle ( Vector3 a,
Vector3 b,
Vector3 c,
Color color )
static

Adds a triangle to be rendered for just one frame.

Parameters
aThe first vertex of the triangle.
bThe second vertex of the triangle.
cThe third vertex of the triangle.
colorThe color in which to draw the triangle.

◆ DrawTriangle() [2/2]

static void VerticesEngine.vxDebug.DrawTriangle ( Vector3 a,
Vector3 b,
Vector3 c,
Color color,
float life )
static

Adds a triangle to be rendered for a set amount of time.

Parameters
aThe first vertex of the triangle.
bThe second vertex of the triangle.
cThe third vertex of the triangle.
colorThe color in which to draw the triangle.
lifeThe amount of time, in seconds, to keep rendering the triangle.

◆ Error()

static void VerticesEngine.vxDebug.Error ( object logObj,
[CallerMemberName] string caller = "" )
static

Log an error.

Parameters
logObj
caller

◆ Init()

static void VerticesEngine.vxDebug.Init ( )
static

Initializes the renderer.

Parameters
graphicsDeviceThe GraphicsDevice to use for rendering.

◆ Log()

static void VerticesEngine.vxDebug.Log ( object logObj,
[CallerMemberName] string caller = "" )
static

A generic log message.

Parameters
logObj
caller

◆ LogNet()

static void VerticesEngine.vxDebug.LogNet ( object logObj,
[CallerMemberName] string caller = "" )
static

A Network Specific Log message.

Parameters
logObj
caller

◆ RetreiveDebugMethods()

static void VerticesEngine.vxDebug.RetreiveDebugMethods ( Assembly assembly)
static

Gets all static methods which have the 'vxDebugMethodAttribute' flag and registers them with the Debug UI.

Parameters
assembly

◆ Warn()

static void VerticesEngine.vxDebug.Warn ( object logObj,
[CallerMemberName] string caller = "" )
static

Log a warning.

Parameters
logObj
caller

Property Documentation

◆ CommandUI

vxDebugCommandUI VerticesEngine.vxDebug.CommandUI
staticget

Is output Verbose.

Gets the DebugCommandUI for the system.


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