Package org.jbox2d.testbed.framework.j2d
Class DebugDrawJ2D
- java.lang.Object
-
- org.jbox2d.callbacks.DebugDraw
-
- org.jbox2d.testbed.framework.j2d.DebugDrawJ2D
-
-
Field Summary
Fields Modifier and Type Field Description static intcirclePointsprivate ColorPoolcpoolprivate TestPanelJ2Dpanelprivate Vec2saxisprivate Vec2sp1private Vec2sp2private Vec2tempprivate Vec2temp2private Vec2Arrayvec2Arrayprivate static IntArrayxIntsPoolprivate static IntArrayyIntsPool-
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 Constructor Description DebugDrawJ2D(TestPanelJ2D argTestPanel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrawAABB(AABB argAABB, Color3f color)voiddrawCircle(Vec2 center, float radius, Color3f color)Draw a circle.voiddrawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor)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, java.lang.String s, Color3f color)Draw a string.voiddrawTransform(Transform xf)Draw a transform.private voidgenerateCirle(Vec2 argCenter, float argRadius, Vec2[] argPoints, int argNumPoints)private java.awt.Graphics2DgetGraphics()-
Methods inherited from class org.jbox2d.callbacks.DebugDraw
appendFlags, clearFlags, drawPolygon, drawString, getFlags, getScreenToWorld, getScreenToWorld, getScreenToWorldToOut, getScreenToWorldToOut, getViewportTranform, getWorldToScreen, getWorldToScreen, getWorldToScreenToOut, getWorldToScreenToOut, setCamera, setFlags
-
-
-
-
Field Detail
-
circlePoints
public static int circlePoints
-
panel
private final TestPanelJ2D panel
-
cpool
private final ColorPool cpool
-
vec2Array
private final Vec2Array vec2Array
-
sp1
private final Vec2 sp1
-
sp2
private final Vec2 sp2
-
saxis
private final Vec2 saxis
-
temp
private final Vec2 temp
-
xIntsPool
private static final IntArray xIntsPool
-
yIntsPool
private static final IntArray yIntsPool
-
temp2
private final Vec2 temp2
-
-
Constructor Detail
-
DebugDrawJ2D
public DebugDrawJ2D(TestPanelJ2D argTestPanel)
- Parameters:
viewport-
-
-
Method Detail
-
drawCircle
public void drawCircle(Vec2 center, float radius, Color3f color)
Description copied from class:DebugDrawDraw a circle.- Specified by:
drawCirclein classDebugDraw
-
drawSegment
public void drawSegment(Vec2 p1, Vec2 p2, Color3f color)
Description copied from class:DebugDrawDraw a line segment.- Specified by:
drawSegmentin classDebugDraw
-
drawSolidCircle
public void drawSolidCircle(Vec2 center, float radius, Vec2 axis, Color3f color)
Description copied from class:DebugDrawDraw a solid circle.- Specified by:
drawSolidCirclein classDebugDraw
-
drawSolidPolygon
public void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color)
Description copied from class:DebugDrawDraw a solid closed polygon provided in CCW order.- Specified by:
drawSolidPolygonin classDebugDraw
-
drawString
public void drawString(float x, float y, java.lang.String s, Color3f color)Description copied from class:DebugDrawDraw a string.- Specified by:
drawStringin classDebugDraw
-
getGraphics
private java.awt.Graphics2D getGraphics()
-
drawTransform
public void drawTransform(Transform xf)
Description copied from class:DebugDrawDraw a transform. Choose your own length scale- Specified by:
drawTransformin classDebugDraw
-
-