DebugRenderer Class |
Namespace: DigitalRune.Graphics.Rendering
The DebugRenderer type exposes the following members.
Name | Description | |
---|---|---|
DebugRenderer(IGraphicsService, SpriteFont) |
Initializes a new instance of the DebugRenderer class.
| |
DebugRenderer(IGraphicsService, SpriteBatch, SpriteFont) | Obsolete.
Initializes a new instance of the DebugRenderer class.
|
Name | Description | |
---|---|---|
Clear |
Clears the debug renderer (removes all draw jobs).
| |
Dispose |
Releases all resources used by an instance of the DebugRenderer class.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the DebugRenderer class
and optionally releases the managed resources.
| |
DrawAabb |
Draws an axis-aligned bounding-box (AABB). Wire-frame only.
| |
DrawAabbs |
Draws the axis-aligned bounding-boxes (AABBs) of a collection of geometries.
| |
DrawArrow |
Draws an arrow pointing from start to end.
| |
DrawAxes |
Draws 3 axes for a coordinate cross.
| |
DrawBox |
Draws a box.
| |
DrawCapsule |
Draws a capsule that is centered at the local origin and parallel to the local y axis.
| |
DrawCone |
Draws a cone with the base on the local xz plane pointing up into the local +y direction.
| |
DrawContact |
Draws a contact.
| |
DrawContacts(ContactSet, Single, NullableColor, Boolean) |
Draws contacts.
| |
DrawContacts(ContactSetCollection, Single, NullableColor, Boolean) |
Draws contacts.
| |
DrawCylinder |
Draws a cylinder that is centered at the local origin and parallel to the local y axis.
| |
DrawLine |
Draws a line.
| |
DrawMesh(Mesh, Pose, Vector3F, Color, Boolean, Boolean) |
Draws a mesh.
| |
DrawMesh(Submesh, Pose, Vector3F, Color, Boolean, Boolean) |
Draws a submesh.
| |
DrawModel(SceneNode, Color, Boolean, Boolean) |
Draws a model (meshes without textures).
| |
DrawModel(Model, Pose, Vector3F, Color, Boolean, Boolean) |
Draws a model (without textures).
| |
DrawObject |
Draws a geometric object.
| |
DrawObjects |
Draws geometric objects.
| |
DrawPoint |
Draws a point.
| |
DrawShape |
Draws a geometric object.
| |
DrawSkeleton(MeshNode, Single, Color, Boolean) |
Draws skeleton bones, bone space axes and bone names of a MeshNode for debugging.
| |
DrawSkeleton(SkeletonPose, Pose, Vector3F, Single, Color, Boolean) |
Draws skeleton bones, bone space axes and bone names of a MeshNode for debugging.
| |
DrawSphere |
Draws a sphere.
| |
DrawText(String) |
Draws the text to the screen.
| |
DrawText(StringBuilder) |
Draws the text to the screen.
| |
DrawText(String, Vector2F, Color) |
Draws a text on a 2D position in screen space.
| |
DrawText(StringBuilder, Vector2F, Color) |
Draws a text on a 2D position in screen space.
| |
DrawText(String, Vector2F, Vector2F, Color) |
Draws a text on a 2D position in screen space.
| |
DrawText(String, Vector3F, Color, Boolean) |
Draws a text on a 3D position in world space.
| |
DrawText(StringBuilder, Vector2F, Vector2F, Color) |
Draws a text on a 2D position in screen space.
| |
DrawText(StringBuilder, Vector3F, Color, Boolean) |
Draws a text on a 3D position in world space.
| |
DrawText(String, Vector3F, Vector2F, Color, Boolean) |
Draws a text on a 3D position in world space.
| |
DrawText(StringBuilder, Vector3F, Vector2F, Color, Boolean) |
Draws a text on a 3D position in world space.
| |
DrawTexture |
Draws a texture.
| |
DrawTriangle(Triangle, Pose, Vector3F, Color, Boolean, Boolean) |
Draws a triangle (with counter-clockwise winding for front faces).
| |
DrawTriangle(Vector3F, Vector3F, Vector3F, Color, Boolean, Boolean) |
Draws a triangle (with counter-clockwise winding for front faces).
| |
DrawTriangle(Triangle, Pose, Vector3F, Vector3F, Color, Boolean, Boolean) |
Draws a triangle (with counter-clockwise winding for front faces).
| |
DrawTriangle(Vector3F, Vector3F, Vector3F, Vector3F, Color, Boolean, Boolean) |
Draws a triangle (with counter-clockwise winding for front faces).
| |
DrawTriangles |
Draws the triangles of the given mesh (with counter-clockwise winding for front faces).
| |
DrawViewVolume(ViewVolume, Pose, Color, Boolean, Boolean) |
Draws a view volume (viewing frustum).
| |
DrawViewVolume(ViewVolume, Pose, Vector3F, Color, Boolean, Boolean) |
Draws a view volume (viewing frustum).
| |
DrawViewVolume(Boolean, Single, Single, Single, Single, Single, Single, Pose, Color, Boolean, Boolean) |
Draws a view volume (viewing frustum).
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Render |
Draws the debug information.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update | Obsolete.
Updates the internal caches of the DebugRenderer.
(Usually you do not need to call this method, see remarks.)
|
Name | Description | |
---|---|---|
ArrowHeadSize |
Gets or sets the size of the arrow head (relative to the arrow length).
| |
AutoRenderStates |
Gets or sets a value indicating whether the debug renderer automatically sets the required
render states (depth-stencil, blend and rasterizer states required to render solid or
wireframe, in or over scene, opaque or transparent).
| |
DefaultColor |
Gets or sets the default color that is used if no color is explicitly specified.
| |
DefaultTextPosition |
Gets or sets the default text position.
| |
Effect |
Gets the effect used for rendering.
| |
Enabled |
Gets or sets a value indicating whether this DebugRenderer is enabled.
| |
IsDisposed |
Gets a value indicating whether this instance has been disposed of.
| |
PointSize |
Gets or sets the size of drawn points.
| |
SpriteFont |
Gets or sets the sprite font.
|
This class is your one-stop-shop for simple debug rendering. It has several DrawXyz() methods to draw points, lines, geometric objects, text, textures, etc. Calling a DrawXyz() method does not immediately draw something - instead the draw job is cached and all draw jobs are rendered when Render(RenderContext) is called. Clear can be used to remove all current draw jobs.
Many draw calls allow to specify a flag "drawOverScene". If this flag is set, the objects are drawn over the scene - they ignore the z-buffer information of the scene. Many draw calls for solid shapes allow to specify a flag "drawWireFrame". If this flag is set, a simplified line representation is drawn instead of solid faces.
For text rendering, a SpriteFont must be set. The DebugRenderer does not have a default sprite font.
Primitives drawn with solid faces can be transparent. All color values use non-premultiplied alpha.
This class assumes that all input color values are non-premultiplied alpha values.
Render Target and Viewport:
This renderer renders into the current render target and viewport of the graphics device.