Class DebugDraw¶
Namespace: Apogee.Core.Graphics
Assembly: Apogee.Core.dll
Immediate-mode debug drawing: lines and triangles in world positions that live for one frame. Anything may add to it (gameplay, physics, tools) with no knowledge of
rendering; the renderer draws what is in it when a frame is rendered and the owner then
public sealed class DebugDraw
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties¶
Capacity¶
The most lines, and the most triangles, that are kept.
public int Capacity { get; set; }
Property Value¶
Dropped¶
How many lines and triangles did not fit since the last
public int Dropped { get; }
Property Value¶
IsEmpty¶
public bool IsEmpty { get; }
Property Value¶
LineCount¶
public int LineCount { get; }
Property Value¶
Lines¶
public ReadOnlySpan<DebugLine> Lines { get; }
Property Value¶
TriangleCount¶
public int TriangleCount { get; }
Property Value¶
Triangles¶
public ReadOnlySpan<DebugTriangle> Triangles { get; }
Property Value¶
Methods¶
AddLines(ReadOnlySpan<DebugLine>)¶
Adds lines made elsewhere (physics hands over what Jolt collected in one go).
public void AddLines(ReadOnlySpan<DebugLine> lines)
Parameters¶
lines ReadOnlySpan<DebugLine>
AddTriangles(ReadOnlySpan<DebugTriangle>)¶
public void AddTriangles(ReadOnlySpan<DebugTriangle> triangles)
Parameters¶
triangles ReadOnlySpan<DebugTriangle>
Arrow(Double3, Double3, uint, float)¶
A line with a head at to; the head is headLength long (a fifth of the arrow when it is zero).
public void Arrow(Double3 from, Double3 to, uint color, float headLength = 0)
Parameters¶
from Double3
to Double3
color uint
headLength float
Axes(Double3, Quaternion, float)¶
The three axes of a placement: X red, Y green, Z blue, each length long.
public void Axes(Double3 origin, Quaternion rotation, float length)
Parameters¶
origin Double3
rotation Quaternion
length float
Box(Double3, Vector3, Quaternion, uint)¶
The twelve edges of a box centered at center, halfExtents from the center to each face before it is turned by rotation.
public void Box(Double3 center, Vector3 halfExtents, Quaternion rotation, uint color)
Parameters¶
center Double3
halfExtents Vector3
rotation Quaternion
color uint
Box(Double3, Double3, uint)¶
An axis-aligned box from its two opposite corners.
public void Box(Double3 min, Double3 max, uint color)
Parameters¶
min Double3
max Double3
color uint
Circle(Double3, Vector3, Vector3, float, uint, int)¶
A circle of radius around center in the plane that axisA and axisB (unit, at right angles) span.
public void Circle(Double3 center, Vector3 axisA, Vector3 axisB, float radius, uint color, int segments = 24)
Parameters¶
center Double3
axisA Vector3
axisB Vector3
radius float
color uint
segments int
Clear()¶
public void Clear()
Line(Double3, Double3, uint)¶
public void Line(Double3 from, Double3 to, uint color)
Parameters¶
from Double3
to Double3
color uint
Sphere(Double3, float, uint, int)¶
A sphere as its three great circles.
public void Sphere(Double3 center, float radius, uint color, int segments = 24)
Parameters¶
center Double3
radius float
color uint
segments int
Triangle(Double3, Double3, Double3, uint)¶
public void Triangle(Double3 a, Double3 b, Double3 c, uint color)
Parameters¶
a Double3
b Double3
c Double3
color uint