DebugDraw class abstract

Implement this abstract class to allow Forge2d to automatically draw your physics for debugging purposes.

Not intended to replace your own custom rendering routines!

Constructors

DebugDraw(ViewportTransform viewport)
Implement this abstract class to allow Forge2d to automatically draw your physics for debugging purposes.

Properties

drawFlags int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
viewport ViewportTransform
final

Methods

appendFlags(int flags) → void
clearFlags(int flags) → void
drawCircle(Vector2 center, double radius, Color3i color) → void
Draw a circle.
drawCircleAxis(Vector2 center, double radius, Vector2 axis, Color3i color) → void
Draws a circle with an axis.
drawParticles(List<Particle> particles, double radius) → void
Draw a particle array.
drawParticlesWireframe(List<Particle> particles, double radius) → void
Draw a particle array.
drawPoint(Vector2 argPoint, double argRadiusOnScreen, Color3i argColor) → void
drawPolygon(List<Vector2> vertices, Color3i color) → void
Draw a closed polygon provided in counter-clockwise order.
drawSegment(Vector2 p1, Vector2 p2, Color3i color) → void
Draw a line segment.
drawSolidCircle(Vector2 center, double radius, Color3i color) → void
Draw a solid circle.
drawSolidPolygon(List<Vector2> vertices, Color3i color) → void
Draw a solid closed polygon provided in counter-clockwise order.
drawString(Vector2 pos, String s, Color3i color) → void
drawStringXY(double x, double y, String s, Color3i color) → void
Draw a string.
drawTransform(Transform xf, Color3i color) → void
Draw a transform.
flush() → void
Called at the end of drawing a world.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
screenToWorld(Vector2 argScreen) Vector2
Takes the screen coordinates (argScreen) and returns the world coordinates.
toString() String
A string representation of this object.
inherited
worldToScreen(Vector2 argWorld) Vector2
Takes the world coordinate and returns the screen coordinates.
worldToScreenXY(double worldX, double worldY) Vector2
Takes the world coordinates and returns the screen coordinates.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

aabbBit → const int
Draw axis aligned bounding boxes.
centerOfMassBit → const int
Draw center of mass frame.
dynamicTreeBit → const int
Draw dynamic tree.
jointBit → const int
Draw joint connections.
pairBit → const int
Draw pairs of connected objects.
shapeBit → const int
Draw shapes.
wireFrameDrawingBit → const int
Draw only the wireframe for drawing performance.