|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbox2d.callbacks.DebugDraw
public abstract class DebugDraw
Implement this abstract class to allow JBox2d to automatically draw your physics for debugging purposes. Not intended to replace your own custom rendering routines!
Field Summary | |
---|---|
static int |
e_aabbBit
|
static int |
e_centerOfMassBit
|
static int |
e_dynamicTreeBit
|
static int |
e_jointBit
|
static int |
e_pairBit
|
static int |
e_shapeBit
|
protected int |
m_drawFlags
|
protected IViewportTransform |
viewportTransform
|
Constructor Summary | |
---|---|
DebugDraw(IViewportTransform viewport)
|
Method Summary | |
---|---|
void |
appendFlags(int flags)
|
void |
clearFlags(int flags)
|
abstract void |
drawCircle(Vec2 center,
float radius,
Color3f color)
Draw a circle. |
abstract void |
drawPoint(Vec2 argPoint,
float argRadiusOnScreen,
Color3f argColor)
|
void |
drawPolygon(Vec2[] vertices,
int vertexCount,
Color3f color)
Draw a closed polygon provided in CCW order. |
abstract void |
drawSegment(Vec2 p1,
Vec2 p2,
Color3f color)
Draw a line segment. |
abstract void |
drawSolidCircle(Vec2 center,
float radius,
Vec2 axis,
Color3f color)
Draw a solid circle. |
abstract void |
drawSolidPolygon(Vec2[] vertices,
int vertexCount,
Color3f color)
Draw a solid closed polygon provided in CCW order. |
abstract void |
drawString(float x,
float y,
String s,
Color3f color)
Draw a string. |
void |
drawString(Vec2 pos,
String s,
Color3f color)
|
abstract void |
drawTransform(Transform xf)
Draw a transform. |
int |
getFlags()
|
Vec2 |
getScreenToWorld(float screenX,
float screenY)
takes the screen coordinates and returns the world coordinates. |
Vec2 |
getScreenToWorld(Vec2 argScreen)
takes the screen coordinates (argScreen) and returns the world coordinates |
void |
getScreenToWorldToOut(float screenX,
float screenY,
Vec2 argWorld)
takes the screen coordinates and puts the corresponding world coordinates in argWorld. |
void |
getScreenToWorldToOut(Vec2 argScreen,
Vec2 argWorld)
|
IViewportTransform |
getViewportTranform()
|
Vec2 |
getWorldToScreen(float worldX,
float worldY)
Takes the world coordinates and returns the screen coordinates. |
Vec2 |
getWorldToScreen(Vec2 argWorld)
takes the world coordinate (argWorld) and returns the screen coordinates. |
void |
getWorldToScreenToOut(float worldX,
float worldY,
Vec2 argScreen)
Takes the world coordinates and puts the corresponding screen coordinates in argScreen. |
void |
getWorldToScreenToOut(Vec2 argWorld,
Vec2 argScreen)
|
void |
setCamera(float x,
float y,
float scale)
|
void |
setFlags(int flags)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int e_shapeBit
public static final int e_jointBit
public static final int e_aabbBit
public static final int e_pairBit
public static final int e_centerOfMassBit
public static final int e_dynamicTreeBit
protected int m_drawFlags
protected final IViewportTransform viewportTransform
Constructor Detail |
---|
public DebugDraw(IViewportTransform viewport)
Method Detail |
---|
public void setFlags(int flags)
public int getFlags()
public void appendFlags(int flags)
public void clearFlags(int flags)
public void drawPolygon(Vec2[] vertices, int vertexCount, Color3f color)
drawSegment(Vec2, Vec2, Color3f)
to draw each side of the
polygon.
vertices
- vertexCount
- color
- public abstract void drawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor)
public abstract void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color)
vertices
- vertexCount
- color
- public abstract void drawCircle(Vec2 center, float radius, Color3f color)
center
- radius
- color
- public abstract void drawSolidCircle(Vec2 center, float radius, Vec2 axis, Color3f color)
center
- radius
- axis
- color
- public abstract void drawSegment(Vec2 p1, Vec2 p2, Color3f color)
p1
- p2
- color
- public abstract void drawTransform(Transform xf)
xf
- public abstract void drawString(float x, float y, String s, Color3f color)
x
- y
- s
- color
- public void drawString(Vec2 pos, String s, Color3f color)
public IViewportTransform getViewportTranform()
public void setCamera(float x, float y, float scale)
x
- y
- scale
- IViewportTransform.setCamera(float, float, float)
public void getScreenToWorldToOut(Vec2 argScreen, Vec2 argWorld)
argScreen
- argWorld
- IViewportTransform.getScreenToWorld(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
public void getWorldToScreenToOut(Vec2 argWorld, Vec2 argScreen)
argWorld
- argScreen
- IViewportTransform.getWorldToScreen(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
public void getWorldToScreenToOut(float worldX, float worldY, Vec2 argScreen)
worldX
- worldY
- argScreen
- public Vec2 getWorldToScreen(Vec2 argWorld)
argWorld
- public Vec2 getWorldToScreen(float worldX, float worldY)
worldX
- worldY
- public void getScreenToWorldToOut(float screenX, float screenY, Vec2 argWorld)
screenX
- screenY
- argWorld
- public Vec2 getScreenToWorld(Vec2 argScreen)
argScreen
- public Vec2 getScreenToWorld(float screenX, float screenY)
screenX
- screenY
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |