DebugDraw class

Implement this abstract class to allow DBox2d to automatically draw your physics for debugging purposes. Not intended to replace your own custom rendering routines!

@author Daniel Murphy

Implementers

Constructors

DebugDraw(ViewportTransform viewportTransform)
DebugDraw.zero()

Properties

drawFlags int
read / write
viewportTransform ViewportTransform
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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<Vector2> centers, double radius, List<ParticleColor> colors, int count) → void
Draw a particle array [...]
drawParticlesWireframe(List<Vector2> centers, double radius, List<ParticleColor> colors, int count) → void
Draw a particle array [...]
drawPoint(Vector2 argPoint, double argRadiusOnScreen, Color3i argColor) → void
drawPolygon(List<Vector2> vertices, int vertexCount, Color3i color) → void
Draw a closed polygon provided in CCW order. This implementation uses {@link #drawSegment(Vec2, Vec2, Color3f)} to draw each side of the polygon. [...]
drawSegment(Vector2 p1, Vector2 p2, Color3i color) → void
Draw a line segment. [...]
drawSolidCircle(Vector2 center, double radius, Vector2 axis, Color3i color) → void
Draw a solid circle. [...]
drawSolidPolygon(List<Vector2> vertices, int vertexCount, Color3i color) → void
Draw a solid closed polygon provided in CCW 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. Choose your own length scale [...]
flush() → void
Called at the end of drawing a world
getScreenToWorld(Vector2 argScreen) Vector2
takes the screen coordinates (argScreen) and returns the world coordinates [...]
getScreenToWorldToOut(Vector2 argScreen, Vector2 argWorld) → void
@param argScreen @param argWorld
getScreenToWorldToOutXY(double screenX, double screenY, Vector2 argWorld) → void
takes the screen coordinates and puts the corresponding world coordinates in argWorld. [...]
getScreenToWorldXY(double screenX, double screenY) Vector2
takes the screen coordinates and returns the world coordinates. [...]
getViewportTranform() ViewportTransform
getWorldToScreen(Vector2 argWorld) Vector2
takes the world coordinate (argWorld) and returns the screen coordinates. [...]
getWorldToScreenToOut(Vector2 argWorld, Vector2 argScreen) → void
@param argWorld @param argScreen
getWorldToScreenToOutXY(double worldX, double worldY, Vector2 argScreen) → void
Takes the world coordinates and puts the corresponding screen coordinates in argScreen. [...]
getWorldToScreenXY(double worldX, double worldY) Vector2
Takes the world coordinates and returns the screen coordinates. [...]
setCamera(double x, double y, double scale) → void
@param x @param y @param scale @deprecated use the viewport transform in {@link #getViewportTranform()}
setViewportTransform(ViewportTransform viewportTransform) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

AABB_BIT → const int
Draw axis aligned bounding boxes
1 << 3
CENTER_OF_MASS_BIT → const int
Draw center of mass frame
1 << 5
DYNAMIC_TREE_BIT → const int
Draw dynamic tree
1 << 6
JOINT_BIT → const int
Draw joint connections
1 << 2
PAIR_BIT → const int
Draw pairs of connected objects
1 << 4
SHAPE_BIT → const int
Draw shapes
1 << 1
WIREFRAME_DRAWING_BIT → const int
Draw only the wireframe for drawing performance
1 << 7