Class DebugDrawJ2D

java.lang.Object
org.jbox2d.callbacks.DebugDraw
org.jbox2d.testbed.framework.j2d.DebugDrawJ2D

public class DebugDrawJ2D extends DebugDraw
Implementation of DebugDraw that uses Java2D! Hooray!
  • Field Details

    • 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 Details

    • DebugDrawJ2D

      public DebugDrawJ2D(TestPanelJ2D argTestPanel)
      Parameters:
      viewport -
  • Method Details

    • drawCircle

      public void drawCircle(Vec2 center, float radius, Color3f color)
      Description copied from class: DebugDraw
      Draw a circle.
      Specified by:
      drawCircle in class DebugDraw
      Parameters:
      center -
      radius -
      color -
    • drawPoint

      public void drawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor)
      Specified by:
      drawPoint in class DebugDraw
    • drawSegment

      public void drawSegment(Vec2 p1, Vec2 p2, Color3f color)
      Description copied from class: DebugDraw
      Draw a line segment.
      Specified by:
      drawSegment in class DebugDraw
      Parameters:
      p1 -
      p2 -
      color -
    • drawAABB

      public void drawAABB(AABB argAABB, Color3f color)
    • 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 class DebugDraw
      Parameters:
      center -
      radius -
      axis -
      color -
    • 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 class DebugDraw
      Parameters:
      vertices -
      vertexCount -
      color -
    • 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 class DebugDraw
      Parameters:
      x -
      y -
      s -
      color -
    • 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 class DebugDraw
      Parameters:
      xf -
    • generateCirle

      private void generateCirle(Vec2 argCenter, float argRadius, Vec2[] argPoints, int argNumPoints)