[This is preliminary documentation and is subject to change.]

Provides various GL-based drawing methods suitable for debug views.

Namespace: org.critterai.u3d
Assembly: cai-util-u3d (in cai-util-u3d.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static class DebugDraw
Public NotInheritable Class DebugDraw
public ref class DebugDraw abstract sealed

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
AppendArc(Vector3, Vector3, Single, Single, Single)
Appends a simple arc.
AppendArrow(Vector3, Vector3, Single, Single)
Append an arrow.
AppendBounds(Vector3, Vector3)
Append a wireframe axis-aligned bounding box.
AppendCircle(Vector3, Single)
Append an unfilled circle on the xz-plane.
AppendCylinder(Vector3, Single, Single, Boolean)
Append a simple wireframe cylinder with four risers.
AppendExtents(Vector3, Vector3)
Append a wireframe axis-aligned bounding box representing the extents.
AppendXMarker(Vector3, Single)
Draw an X-marker at the specified position.
Arc(Vector3, Vector3, Single, Single, Single, Color)
Draws a simple arc.
Arrow(Vector3, Vector3, Single, Single, Color)
Draw an arrow.
Bounds(Vector3, Vector3, Color)
Draw a wireframe axis-aligned bounding box.
Circle(Vector3, Single, Color)
Draw an unfilled circle on the xz-plane.
ConvexPoly(array<Vector3>[]()[][], Int32, Color)
Append a filled convex polygon.
Cylinder(Vector3, Single, Single, Boolean, Color)
Draw a simple wireframe cylinder with four risers.
DiamondMarker(Vector3, Single, Color)
Draw a diamond shape at the specified position.
Extents(Vector3, Vector3, Color)
Draw a wireframe axis-aligned bounding box representing the extents.
Grid(Vector3, Single, Int32, Int32, Color)
Draw a simple wireframe grid on the xz-plane.
Rect(Vector3, Single, Single, Color, Boolean)
Draw an axis aligned rectangle on the xz-plane.
SimpleMaterial
A shared material suitable for simple drawing operations.
TriangleMesh(array<Vector3>[]()[][], array<Int32>[]()[][], Int32, Boolean, Color)
Draw a triangle mesh.
TriangleMesh(array<Vector3>[]()[][], array<Int32>[]()[][], array<Byte>[]()[][], Int32, Boolean, Single)
Draw a triangle mesh, colored per triangle.
XMarker(Vector3, Single, Color)
Draw an X-marker at the specified position.

Remarks

Append methods require the caller to handle all GL setup and teardown. Unless otherwise noted they expect GL to be in GL.Lines mode.

CopyC#
// Example: Using append methods:

Vector3 startPos = new Vector3(1, 0, 0);
Vector3 endPos = new Vector3(10, 15, 20);
float scale = 1;
float height = 5;

DebugDraw.SimpleMaterial.SetPass(0);

GL.Begin(GL.LINES);

GL.Color(Color.green);
DebugDraw.AppendXMarker(startPos, scale);
DebugDraw.AppendArc(startPos, endPos, height, scale * 0, scale * 0.1f);

GL.Color(Color.red)
DebugDraw.AppendXMarker(endPos, scale);

GL.End();

Inheritance Hierarchy

System..::..Object
  org.critterai.u3d..::..DebugDraw

See Also