org.jbox2d.integrations.slick
Class SlickDebugDraw
java.lang.Object
org.jbox2d.dynamics.DebugDraw
org.jbox2d.integrations.slick.SlickDebugDraw
public class SlickDebugDraw
- extends DebugDraw
Not fully implemented - just enough here to get the Pyramid
demo to draw.
Method Summary |
void |
drawCircle(Vec2 center,
float radius,
Color3f color)
|
void |
drawPoint(Vec2 position,
float f,
Color3f color3f)
|
void |
drawPolygon(Vec2[] vertices,
int vertexCount,
Color3f color)
|
void |
drawSegment(Vec2 p1,
Vec2 p2,
Color3f color)
|
void |
drawSolidCircle(Vec2 center,
float radius,
Vec2 axis,
Color3f color)
|
void |
drawSolidPolygon(Vec2[] vertices,
int vertexCount,
Color3f color)
|
void |
drawString(float x,
float y,
java.lang.String s,
Color3f color)
|
void |
drawXForm(XForm xf)
|
float |
map(float mapMe,
float fromLow,
float fromHigh,
float toLow,
float toHigh)
|
Vec2 |
screenToWorld(float x,
float y)
|
Vec2 |
screenToWorld(Vec2 screen)
|
Vec2 |
worldToScreen(float x,
float y)
|
Vec2 |
worldToScreen(Vec2 world)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transX
public float transX
transY
public float transY
scaleFactor
public float scaleFactor
yFlip
public float yFlip
SlickDebugDraw
public SlickDebugDraw()
map
public float map(float mapMe,
float fromLow,
float fromHigh,
float toLow,
float toHigh)
worldToScreen
public Vec2 worldToScreen(Vec2 world)
- Overrides:
worldToScreen
in class DebugDraw
- Parameters:
world
- World position
- Returns:
- Screen position
worldToScreen
public Vec2 worldToScreen(float x,
float y)
- Overrides:
worldToScreen
in class DebugDraw
- Parameters:
x
- World x positiony
- World y position
- Returns:
- Screen position
screenToWorld
public Vec2 screenToWorld(Vec2 screen)
- Overrides:
screenToWorld
in class DebugDraw
- Parameters:
screen
- Screen position
- Returns:
- World position
screenToWorld
public Vec2 screenToWorld(float x,
float y)
- Overrides:
screenToWorld
in class DebugDraw
- Parameters:
x
- Screen x positiony
- Screey y position
- Returns:
- World position
drawCircle
public void drawCircle(Vec2 center,
float radius,
Color3f color)
- Specified by:
drawCircle
in class DebugDraw
drawPoint
public void drawPoint(Vec2 position,
float f,
Color3f color3f)
- Specified by:
drawPoint
in class DebugDraw
drawPolygon
public void drawPolygon(Vec2[] vertices,
int vertexCount,
Color3f color)
- Specified by:
drawPolygon
in class DebugDraw
drawSolidPolygon
public void drawSolidPolygon(Vec2[] vertices,
int vertexCount,
Color3f color)
- Specified by:
drawSolidPolygon
in class DebugDraw
drawSegment
public void drawSegment(Vec2 p1,
Vec2 p2,
Color3f color)
- Specified by:
drawSegment
in class DebugDraw
drawSolidCircle
public void drawSolidCircle(Vec2 center,
float radius,
Vec2 axis,
Color3f color)
- Specified by:
drawSolidCircle
in class DebugDraw
drawString
public void drawString(float x,
float y,
java.lang.String s,
Color3f color)
- Specified by:
drawString
in class DebugDraw
drawXForm
public void drawXForm(XForm xf)
- Specified by:
drawXForm
in class DebugDraw