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!-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
private final ColorPool
private final TestPanelJ2D
private final Vec2
private final Vec2
private final Vec2
private final Vec2
private final Vec2
private final Vec2Array
private static final IntArray
private static final IntArray
Fields inherited from class org.jbox2d.callbacks.DebugDraw
e_aabbBit, e_centerOfMassBit, e_dynamicTreeBit, e_jointBit, e_pairBit, e_shapeBit, m_drawFlags, viewportTransform
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
drawCircle
(Vec2 center, float radius, Color3f color) Draw a circle.void
void
drawSegment
(Vec2 p1, Vec2 p2, Color3f color) Draw a line segment.void
drawSolidCircle
(Vec2 center, float radius, Vec2 axis, Color3f color) Draw a solid circle.void
drawSolidPolygon
(Vec2[] vertices, int vertexCount, Color3f color) Draw a solid closed polygon provided in CCW order.void
drawString
(float x, float y, java.lang.String s, Color3f color) Draw a string.void
Draw a transform.private void
generateCirle
(Vec2 argCenter, float argRadius, Vec2[] argPoints, int argNumPoints) private java.awt.Graphics2D
Methods inherited from class org.jbox2d.callbacks.DebugDraw
appendFlags, clearFlags, drawPolygon, drawString, getFlags, getScreenToWorld, getScreenToWorld, getScreenToWorldToOut, getScreenToWorldToOut, getViewportTranform, getWorldToScreen, getWorldToScreen, getWorldToScreenToOut, getWorldToScreenToOut, setCamera, setFlags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
circlePoints
public static int circlePoints -
panel
-
cpool
-
vec2Array
-
sp1
-
sp2
-
saxis
-
temp
-
xIntsPool
-
yIntsPool
-
temp2
-
-
Constructor Details
-
DebugDrawJ2D
- Parameters:
viewport
-
-
-
Method Details
-
drawCircle
Description copied from class:DebugDraw
Draw a circle.- Specified by:
drawCircle
in classDebugDraw
- Parameters:
center
-radius
-color
-
-
drawPoint
-
drawSegment
Description copied from class:DebugDraw
Draw a line segment.- Specified by:
drawSegment
in classDebugDraw
- Parameters:
p1
-p2
-color
-
-
drawAABB
-
drawSolidCircle
Description copied from class:DebugDraw
Draw a solid circle.- Specified by:
drawSolidCircle
in classDebugDraw
- Parameters:
center
-radius
-axis
-color
-
-
drawSolidPolygon
Description copied from class:DebugDraw
Draw a solid closed polygon provided in CCW order.- Specified by:
drawSolidPolygon
in classDebugDraw
- Parameters:
vertices
-vertexCount
-color
-
-
drawString
Description copied from class:DebugDraw
Draw a string.- Specified by:
drawString
in classDebugDraw
- Parameters:
x
-y
-s
-color
-
-
getGraphics
private java.awt.Graphics2D getGraphics() -
drawTransform
Description copied from class:DebugDraw
Draw a transform. Choose your own length scale- Specified by:
drawTransform
in classDebugDraw
- Parameters:
xf
-
-
generateCirle
-