Skip to content

Class DebugDrawLibrary

Namespace: Apogee.Rendering
Assembly: Apogee.Rendering.dll

Debug drawing for Luau scripts, as the global table debug_draw: lines and shapes that last one frame, drawn over the world. Call them every frame (from a system, or from the devtools.on_gui function) for as long as they should show. Colors are vectors of red, green and blue from 0 to 1; without one a line is white. Positions are the world's. With nowhere to draw (no renderer) the calls do nothing.

[ScriptLibrary("debug_draw")]
public static class DebugDrawLibrary

Inheritance

object ← DebugDrawLibrary

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Target

What the calls draw into. The host sets it, draws it each frame with the world and clears it after.

public static DebugDraw? Target { get; set; }

Property Value

DebugDraw?

Methods

Arrow(Vector3, Vector3, Value)

A line with an arrow head at to.

public static void Arrow(Vector3 from, Vector3 to, Value color = default)

Parameters

from Vector3

to Vector3

color Value

Axes(Vector3, float)

The three axes at a point, each length long: X red, Y green, Z blue.

public static void Axes(Vector3 origin, float length = 1)

Parameters

origin Vector3

length float

Box(Vector3, Vector3, Value)

The edges of the box that has center and reaches half_extents from it along the axes.

public static void Box(Vector3 center, Vector3 halfExtents, Value color = default)

Parameters

center Vector3

halfExtents Vector3

color Value

Line(Vector3, Vector3, Value)

A line from one point to another.

public static void Line(Vector3 from, Vector3 to, Value color = default)

Parameters

from Vector3

to Vector3

color Value

Sphere(Vector3, float, Value)

A sphere as three circles.

public static void Sphere(Vector3 center, float radius, Value color = default)

Parameters

center Vector3

radius float

color Value