Class DebugDrawJ2D
java.lang.Object
org.jbox2d.callbacks.DebugDraw
org.jbox2d.testbed.framework.j2d.DebugDrawJ2D
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intprivate final ColorPoolprivate final TestPanelJ2Dprivate final Vec2private final Vec2private final Vec2private final Vec2private final Vec2private final Vec2Arrayprivate static final IntArrayprivate static final IntArrayFields inherited from class DebugDraw
e_aabbBit, e_centerOfMassBit, e_dynamicTreeBit, e_jointBit, e_pairBit, e_shapeBit, m_drawFlags, viewportTransform -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddrawCircle(Vec2 center, float radius, Color3f color) Draw a circle.voidvoiddrawSegment(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, java.lang.String s, Color3f color) Draw a string.voidDraw a transform.private voidgenerateCirle(Vec2 argCenter, float argRadius, Vec2[] argPoints, int argNumPoints) private java.awt.Graphics2DMethods inherited from class DebugDraw
appendFlags, clearFlags, drawPolygon, drawString, getFlags, getScreenToWorld, getScreenToWorld, getScreenToWorldToOut, getScreenToWorldToOut, getViewportTranform, getWorldToScreen, getWorldToScreen, getWorldToScreenToOut, getWorldToScreenToOut, setCamera, setFlagsMethods 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:DebugDrawDraw a circle.- Specified by:
drawCirclein classDebugDraw- Parameters:
center-radius-color-
-
drawPoint
-
drawSegment
-
drawAABB
-
drawSolidCircle
-
drawSolidPolygon
Description copied from class:DebugDrawDraw a solid closed polygon provided in CCW order.- Specified by:
drawSolidPolygonin classDebugDraw- Parameters:
vertices-vertexCount-color-
-
drawString
Description copied from class:DebugDrawDraw a string.- Specified by:
drawStringin classDebugDraw- Parameters:
x-y-s-color-
-
getGraphics
private java.awt.Graphics2D getGraphics() -
drawTransform
Description copied from class:DebugDrawDraw a transform. Choose your own length scale- Specified by:
drawTransformin classDebugDraw- Parameters:
xf-
-
generateCirle
-