# Class DebugDraw

java.lang.Object
com.codename1.gaming.physics.box2d.callbacks.DebugDraw

public abstract class DebugDraw extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `e_aabbBit`
  < draw joint connections
  `static final int`
  `e_centerOfMassBit`
  < draw axis aligned bounding boxes
  `static final int`
  `e_dynamicTreeBit`
  < draw center of mass frame
  `static final int`
  `e_jointBit`
  < draw shapes
  `static final int`
  `e_pairBit`
  < draw core (TOI) shapes
  `static final int`
  `e_shapeBit`
  `protected int`
  `m_drawFlags`
  < draw dynamic tree.
  `protected final IViewportTransform`
  `viewportTransform`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DebugDraw(IViewportTransform viewport)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `appendFlags(int flags)`
  `void`
  `clearFlags(int flags)`
  `abstract void`
  `drawCircle(Vec2 center, float radius, Color3f color)`
  `abstract void`
  `drawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor)`
  `void`
  `drawPolygon(Vec2[] vertices, int vertexCount, Color3f color)`
  `abstract void`
  `drawSegment(Vec2 p1, Vec2 p2, Color3f color)`
  `abstract void`
  `drawSolidCircle(Vec2 center, float radius, Vec2 axis, Color3f color)`
  `abstract void`
  `drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color)`
  `abstract void`
  `drawString(float x, float y, String s, Color3f color)`
  `void`
  `drawString(Vec2 pos, String s, Color3f color)`
  `abstract void`
  `drawTransform(Transform xf)`
  `int`
  `getFlags()`
  `Vec2`
  `getScreenToWorld(float screenX, float screenY)`
  `Vec2`
  `getScreenToWorld(Vec2 argScreen)`
  `void`
  `getScreenToWorldToOut(float screenX, float screenY, Vec2 argWorld)`
  `void`
  `getScreenToWorldToOut(Vec2 argScreen, Vec2 argWorld)`
  `IViewportTransform`
  `getViewportTranform()`
  `Vec2`
  `getWorldToScreen(float worldX, float worldY)`
  `Vec2`
  `getWorldToScreen(Vec2 argWorld)`
  `void`
  `getWorldToScreenToOut(float worldX, float worldY, Vec2 argScreen)`
  `void`
  `getWorldToScreenToOut(Vec2 argWorld, Vec2 argScreen)`
  `void`
  `setCamera(float x, float y, float scale)`
  `void`
  `setFlags(int flags)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### e_shapeBit

    public static final int e_shapeBit
    See Also:
      - Constant Field Values

  - ### e_jointBit

    public static final int e_jointBit
    < draw shapes
    See Also:
      - Constant Field Values

  - ### e_aabbBit

    public static final int e_aabbBit
    < draw joint connections
    See Also:
      - Constant Field Values

  - ### e_pairBit

    public static final int e_pairBit
    < draw core (TOI) shapes
    See Also:
      - Constant Field Values

  - ### e_centerOfMassBit

    public static final int e_centerOfMassBit
    < draw axis aligned bounding boxes
    See Also:
      - Constant Field Values

  - ### e_dynamicTreeBit

    public static final int e_dynamicTreeBit
    < draw center of mass frame
    See Also:
      - Constant Field Values

  - ### m_drawFlags

    protected int m_drawFlags
    < draw dynamic tree.

  - ### viewportTransform

    protected final IViewportTransform viewportTransform

- ## Constructor Details

  - ### DebugDraw

    public DebugDraw(IViewportTransform viewport)

- ## Method Details

  - ### setFlags

    public void setFlags(int flags)

  - ### getFlags

    public int getFlags()

  - ### appendFlags

    public void appendFlags(int flags)

  - ### clearFlags

    public void clearFlags(int flags)

  - ### drawPolygon

    public void drawPolygon(Vec2[] vertices, int vertexCount, Color3f color)

  - ### drawPoint

    public abstract void drawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor)

  - ### drawSolidPolygon

    public abstract void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color)

  - ### drawCircle

    public abstract void drawCircle(Vec2 center, float radius, Color3f color)

  - ### drawSolidCircle

    public abstract void drawSolidCircle(Vec2 center, float radius, Vec2 axis, Color3f color)

  - ### drawSegment

    public abstract void drawSegment(Vec2 p1, Vec2 p2, Color3f color)

  - ### drawTransform

    public abstract void drawTransform(Transform xf)

  - ### drawString

    public abstract void drawString(float x, float y, String s, Color3f color)

  - ### drawString

    public void drawString(Vec2 pos, String s, Color3f color)

  - ### getViewportTranform

    public IViewportTransform getViewportTranform()

  - ### setCamera

    public void setCamera(float x, float y, float scale)

  - ### getScreenToWorldToOut

    public void getScreenToWorldToOut(Vec2 argScreen, Vec2 argWorld)

  - ### getWorldToScreenToOut

    public void getWorldToScreenToOut(Vec2 argWorld, Vec2 argScreen)

  - ### getWorldToScreenToOut

    public void getWorldToScreenToOut(float worldX, float worldY, Vec2 argScreen)

  - ### getWorldToScreen

    public Vec2 getWorldToScreen(Vec2 argWorld)

  - ### getWorldToScreen

    public Vec2 getWorldToScreen(float worldX, float worldY)

  - ### getScreenToWorldToOut

    public void getScreenToWorldToOut(float screenX, float screenY, Vec2 argWorld)

  - ### getScreenToWorld

    public Vec2 getScreenToWorld(Vec2 argScreen)

  - ### getScreenToWorld

    public Vec2 getScreenToWorld(float screenX, float screenY)