org.jbox2d.dynamics
Class DebugDraw
java.lang.Object
org.jbox2d.dynamics.DebugDraw
- Direct Known Subclasses:
- ProcessingDebugDraw
public abstract class DebugDraw
- extends java.lang.Object
Method Summary |
void |
appendFlags(int flags)
|
void |
clearFlags(int flags)
|
abstract void |
drawCircle(Vec2 center,
float radius,
javax.vecmath.Color3f color)
|
abstract void |
drawPoint(Vec2 position,
float f,
javax.vecmath.Color3f color3f)
|
abstract void |
drawPolygon(Vec2[] vertices,
int vertexCount,
javax.vecmath.Color3f color)
|
abstract void |
drawSegment(Vec2 p1,
Vec2 p2,
javax.vecmath.Color3f color)
|
abstract void |
drawSolidCircle(Vec2 center,
float radius,
Vec2 axis,
javax.vecmath.Color3f color)
|
abstract void |
drawSolidPolygon(Vec2[] vertices,
int vertexCount,
javax.vecmath.Color3f color)
|
abstract void |
drawString(float x,
float y,
java.lang.String s,
javax.vecmath.Color3f color)
|
abstract void |
drawXForm(XForm xf)
|
int |
getFlags()
|
Vec2 |
screenToWorld(float screenx,
float screeny)
|
Vec2 |
screenToWorld(Vec2 screenV)
|
void |
setCamera(float x,
float y,
float scale)
Stub method to overload for camera movement/zoom. |
void |
setFlags(int flags)
|
Vec2 |
worldToScreen(float worldx,
float worldy)
|
Vec2 |
worldToScreen(Vec2 worldV)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
e_shapeBit
public static final int e_shapeBit
- See Also:
- Constant Field Values
e_jointBit
public static final int e_jointBit
- See Also:
- Constant Field Values
e_coreShapeBit
public static final int e_coreShapeBit
- See Also:
- Constant Field Values
e_aabbBit
public static final int e_aabbBit
- See Also:
- Constant Field Values
e_obbBit
public static final int e_obbBit
- See Also:
- Constant Field Values
e_pairBit
public static final int e_pairBit
- See Also:
- Constant Field Values
e_centerOfMassBit
public static final int e_centerOfMassBit
- See Also:
- Constant Field Values
m_drawFlags
protected int m_drawFlags
DebugDraw
public DebugDraw()
setFlags
public void setFlags(int flags)
getFlags
public int getFlags()
appendFlags
public void appendFlags(int flags)
clearFlags
public void clearFlags(int flags)
drawPolygon
public abstract void drawPolygon(Vec2[] vertices,
int vertexCount,
javax.vecmath.Color3f color)
drawSolidPolygon
public abstract void drawSolidPolygon(Vec2[] vertices,
int vertexCount,
javax.vecmath.Color3f color)
drawCircle
public abstract void drawCircle(Vec2 center,
float radius,
javax.vecmath.Color3f color)
drawSolidCircle
public abstract void drawSolidCircle(Vec2 center,
float radius,
Vec2 axis,
javax.vecmath.Color3f color)
drawPoint
public abstract void drawPoint(Vec2 position,
float f,
javax.vecmath.Color3f color3f)
drawSegment
public abstract void drawSegment(Vec2 p1,
Vec2 p2,
javax.vecmath.Color3f color)
drawXForm
public abstract void drawXForm(XForm xf)
drawString
public abstract void drawString(float x,
float y,
java.lang.String s,
javax.vecmath.Color3f color)
setCamera
public void setCamera(float x,
float y,
float scale)
- Stub method to overload for camera movement/zoom.
- Parameters:
x
- - x coordinate of cameray
- - y coordinate of camerascale
- - zoom factor
screenToWorld
public Vec2 screenToWorld(Vec2 screenV)
- Parameters:
screenV
- Screen position
- Returns:
- World position
screenToWorld
public Vec2 screenToWorld(float screenx,
float screeny)
- Parameters:
screenx
- Screen x positionscreeny
- Screey y position
- Returns:
- World position
worldToScreen
public Vec2 worldToScreen(Vec2 worldV)
- Parameters:
worldV
- World position
- Returns:
- Screen position
worldToScreen
public Vec2 worldToScreen(float worldx,
float worldy)
- Parameters:
worldx
- World x positionworldy
- World y position
- Returns:
- Screen position