Table of Contents

Interface IDebugDrawer

Namespace
Jitter2
Assembly
Jitter2.dll

Receives colored line segments and triangles for debug visualization, in world space.

public interface IDebugDrawer
Extension Methods

Remarks

Both drawing methods must be implemented. A wireframe drawer can draw triangles as three line segments. Use DebugDrawGeometry to generate point markers and other drawing geometry.

Methods

DrawSegment(in JVector, in JVector, uint)

Draws a line segment between two points with a color packed as 0xRRGGBBAA.

void DrawSegment(in JVector pA, in JVector pB, uint color)

Parameters

pA JVector

The start point of the segment in world space.

pB JVector

The end point of the segment in world space.

color uint

The color packed as 0xRRGGBBAA.

DrawTriangle(in JVector, in JVector, in JVector, uint)

Draws a triangle with a color packed as 0xRRGGBBAA.

void DrawTriangle(in JVector pA, in JVector pB, in JVector pC, uint color)

Parameters

pA JVector

The first vertex in world space.

pB JVector

The second vertex in world space.

pC JVector

The third vertex in world space.

color uint

The color packed as 0xRRGGBBAA.

Remarks

Vertices are counterclockwise when viewed from the front. The front normal points along (pB - pA) x (pC - pA). Implementations may use back-face culling.