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 int
circlePoints
private ColorPool
cpool
private TestPanelJ2D
panel
private Vec2
saxis
private Vec2
sp1
private Vec2
sp2
private Vec2
temp
private Vec2
temp2
private Vec2Array
vec2Array
private static IntArray
xIntsPool
private static IntArray
yIntsPool
-
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 void
drawAABB(AABB argAABB, Color3f color)
void
drawCircle(Vec2 center, float radius, Color3f color)
Draw a circle.void
drawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor)
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
drawTransform(Transform xf)
Draw a transform.private void
generateCirle(Vec2 argCenter, float argRadius, Vec2[] argPoints, int argNumPoints)
private java.awt.Graphics2D
getGraphics()
-
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:DebugDraw
Draw a circle.- Specified by:
drawCircle
in classDebugDraw
-
drawSegment
public void drawSegment(Vec2 p1, Vec2 p2, Color3f color)
Description copied from class:DebugDraw
Draw a line segment.- Specified by:
drawSegment
in classDebugDraw
-
drawSolidCircle
public void drawSolidCircle(Vec2 center, float radius, Vec2 axis, Color3f color)
Description copied from class:DebugDraw
Draw a solid circle.- Specified by:
drawSolidCircle
in classDebugDraw
-
drawSolidPolygon
public void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color)
Description copied from class:DebugDraw
Draw a solid closed polygon provided in CCW order.- Specified by:
drawSolidPolygon
in classDebugDraw
-
drawString
public void drawString(float x, float y, java.lang.String s, Color3f color)
Description copied from class:DebugDraw
Draw a string.- Specified by:
drawString
in classDebugDraw
-
getGraphics
private java.awt.Graphics2D getGraphics()
-
drawTransform
public void drawTransform(Transform xf)
Description copied from class:DebugDraw
Draw a transform. Choose your own length scale- Specified by:
drawTransform
in classDebugDraw
-
-