Package org.jbox2d.testbed.framework.j2d
Class DebugDrawJ2D
java.lang.Object
org.jbox2d.callbacks.DebugDraw
org.jbox2d.testbed.framework.j2d.DebugDrawJ2D
Implementation of
DebugDraw that uses Java2D! Hooray!- Author:
- Daniel Murphy
-
Field Summary
FieldsFields inherited from class org.jbox2d.callbacks.DebugDraw
aabbBit, centerOfMassBit, drawFlags, dynamicTreeBit, jointBit, pairBit, shapeBit, viewportTransform, wireframeDrawingBit -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddrawCircle(Vec2 center, float radius, Color3f color) Draw a circle.voiddrawCircle(Vec2 center, float radius, Vec2 axis, Color3f color) Draws a circle with an axisvoiddrawParticles(Vec2[] centers, float radius, ParticleColor[] colors, int count) Draw a particle arrayvoiddrawParticlesWireframe(Vec2[] centers, float radius, ParticleColor[] colors, int count) Draw a particle arrayvoidvoiddrawPolygon(Vec2[] vertices, int vertexCount, Color3f color) Draw a closed polygon provided in CCW order.voiddrawSegment(Vec2 p1, Vec2 p2, Color3f color) Draw a line segment.voiddrawSolidCircle(Vec2 center, float radius, Vec2 axis, Color3f color) Draw a solid circle.voiddrawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color) Draw a solid closed polygon provided in CCW order.voiddrawString(float x, float y, String s, Color3f color) Draw a string.voidDraw a transform.voidsetViewportTransform(IViewportTransform viewportTransform) Methods inherited from class org.jbox2d.callbacks.DebugDraw
appendFlags, clearFlags, drawString, flush, getFlags, getScreenToWorld, getScreenToWorld, getScreenToWorldToOut, getScreenToWorldToOut, getViewportTransform, getWorldToScreen, getWorldToScreen, getWorldToScreenToOut, getWorldToScreenToOut, setCamera, setFlags
-
Field Details
-
circlePoints
public static int circlePoints -
edgeWidth
public static final float edgeWidth- See Also:
-
-
Constructor Details
-
DebugDrawJ2D
-
-
Method Details
-
setViewportTransform
- Overrides:
setViewportTransformin classDebugDraw
-
drawPoint
-
drawSegment
Description copied from class:DebugDrawDraw a line segment.- Specified by:
drawSegmentin classDebugDraw
-
drawAABB
-
drawCircle
Description copied from class:DebugDrawDraw a circle.- Specified by:
drawCirclein classDebugDraw
-
drawCircle
Description copied from class:DebugDrawDraws a circle with an axis- Overrides:
drawCirclein classDebugDraw
-
drawSolidCircle
Description copied from class:DebugDrawDraw a solid circle.- Specified by:
drawSolidCirclein classDebugDraw
-
drawParticles
Description copied from class:DebugDrawDraw a particle array- Specified by:
drawParticlesin classDebugDrawcolors- Can be null
-
drawParticlesWireframe
Description copied from class:DebugDrawDraw a particle array- Specified by:
drawParticlesWireframein classDebugDrawcolors- Can be null
-
drawSolidPolygon
Description copied from class:DebugDrawDraw a solid closed polygon provided in CCW order.- Specified by:
drawSolidPolygonin classDebugDraw
-
drawPolygon
Description copied from class:DebugDrawDraw a closed polygon provided in CCW order. This implementation usesDebugDraw.drawSegment(Vec2, Vec2, Color3f)to draw each side of the polygon.- Overrides:
drawPolygonin classDebugDraw
-
drawString
Description copied from class:DebugDrawDraw a string.- Specified by:
drawStringin classDebugDraw
-
drawTransform
Description copied from class:DebugDrawDraw a transform. Choose your own length scale- Specified by:
drawTransformin classDebugDraw
-