public class Box2DDebugRenderer extends java.lang.Object implements Disposable
Modifier and Type | Field and Description |
---|---|
Color |
AABB_COLOR |
Color |
JOINT_COLOR |
protected ShapeRenderer |
renderer
the immediate mode renderer to output our debug drawings
|
Color |
SHAPE_AWAKE |
Color |
SHAPE_KINEMATIC |
Color |
SHAPE_NOT_ACTIVE |
Color |
SHAPE_NOT_AWAKE |
Color |
SHAPE_STATIC |
Color |
VELOCITY_COLOR |
Constructor and Description |
---|
Box2DDebugRenderer() |
Box2DDebugRenderer(boolean drawBodies,
boolean drawJoints,
boolean drawAABBs,
boolean drawInactiveBodies,
boolean drawVelocities,
boolean drawContacts) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases all resources of this object.
|
static Vector2 |
getAxis() |
boolean |
isDrawAABBs() |
boolean |
isDrawBodies() |
boolean |
isDrawContacts() |
boolean |
isDrawInactiveBodies() |
boolean |
isDrawJoints() |
boolean |
isDrawVelocities() |
void |
render(World world,
Matrix4 projMatrix)
This assumes that the projection matrix has already been set.
|
protected void |
renderBody(Body body) |
static void |
setAxis(Vector2 axis) |
void |
setDrawAABBs(boolean drawAABBs) |
void |
setDrawBodies(boolean drawBodies) |
void |
setDrawContacts(boolean drawContacts) |
void |
setDrawInactiveBodies(boolean drawInactiveBodies) |
void |
setDrawJoints(boolean drawJoints) |
void |
setDrawVelocities(boolean drawVelocities) |
protected ShapeRenderer renderer
public final Color SHAPE_NOT_ACTIVE
public final Color SHAPE_STATIC
public final Color SHAPE_KINEMATIC
public final Color SHAPE_NOT_AWAKE
public final Color SHAPE_AWAKE
public final Color JOINT_COLOR
public final Color AABB_COLOR
public final Color VELOCITY_COLOR
public Box2DDebugRenderer()
public Box2DDebugRenderer(boolean drawBodies, boolean drawJoints, boolean drawAABBs, boolean drawInactiveBodies, boolean drawVelocities, boolean drawContacts)
public void render(World world, Matrix4 projMatrix)
protected void renderBody(Body body)
public boolean isDrawBodies()
public void setDrawBodies(boolean drawBodies)
public boolean isDrawJoints()
public void setDrawJoints(boolean drawJoints)
public boolean isDrawAABBs()
public void setDrawAABBs(boolean drawAABBs)
public boolean isDrawInactiveBodies()
public void setDrawInactiveBodies(boolean drawInactiveBodies)
public boolean isDrawVelocities()
public void setDrawVelocities(boolean drawVelocities)
public boolean isDrawContacts()
public void setDrawContacts(boolean drawContacts)
public static Vector2 getAxis()
public static void setAxis(Vector2 axis)
public void dispose()
Disposable
dispose
in interface Disposable