|
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 () |
|
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.