DebugDraw class Rendering
Immediate-mode wireframe debug visualization utility for lines, rays, boxes, spheres, axes, and physics colliders.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- maxVertexLimit ↔ int
-
Maximum vertex limit to avoid unbounded accumulation when un-flushed.
getter/setter pair
- vertexCount → int
-
Total number of line vertices accumulated for the current frame.
no setter
Static Methods
-
axes(
Matrix4 transform, {double size = 1.0}) → void -
Draws 3D coordinate axes (RGB = XYZ) for
transform. -
box(
Aabb3 bounds, {Vector4? color}) → void - Draws an axis-aligned bounding box wireframe.
-
clear(
) → void - Clears all accumulated debug geometry without building.
-
colliders(
Node root, {Vector4? color, Vector4? triggerColor, int segments = 16}) → void -
Draws the wireframe of every Collider in the
rootsubtree, posed the way the simulation sees it. -
createGeometry(
) → MeshGeometry - Creates an empty updatable line geometry for flushInto.
-
flushInto(
MeshGeometry geometry) → void -
Rebuilds
geometryfrom the accumulated line segments and clears the buffer. -
flushMesh(
{GeometryBufferArena? bufferArena, GeometryStorage storage = GeometryStorage.fixed}) → MeshGeometry? - Builds a new MeshGeometry containing all accumulated line segments and clears the buffer. For lines redrawn every frame, prefer flushInto.
-
line(
Vector3 start, Vector3 end, {Vector4? color}) → void -
Draws a wireframe line segment between
startandend. -
ray(
Vector3 origin, Vector3 direction, {double length = 1.0, Vector4? color}) → void -
Draws a ray starting at
originalongdirectionwith lengthlength. -
shape(
Shape shape, Matrix4 transform, {Vector4? color, int segments = 16}) → void -
Draws the wireframe of a physics
shapeposed bytransform. -
sphere(
Vector3 center, double radius, {int segments = 16, Vector4? color}) → void -
Draws a wireframe sphere at
centerwithradius.