libgdx API

com.badlogic.gdx.physics.box2d
Class Box2DDebugRenderer

java.lang.Object
  extended by com.badlogic.gdx.physics.box2d.Box2DDebugRenderer

public class Box2DDebugRenderer
extends java.lang.Object


Field Summary
 SpriteBatch batch
          a spritebatch and a font for text rendering
protected  ShapeRenderer renderer
          the immediate mode renderer to output our debug drawings
 
Constructor Summary
Box2DDebugRenderer()
           
Box2DDebugRenderer(boolean drawBodies, boolean drawJoints, boolean drawAABBs, boolean drawInactiveBodies)
           
 
Method Summary
 void dispose()
           
static Vector2 getAxis()
           
 boolean isDrawAABBs()
           
 boolean isDrawBodies()
           
 boolean isDrawInactiveBodies()
           
 boolean isDrawJoints()
           
 void render(World world, Matrix4 projMatrix)
          This assumes that the projection matrix has already been set.
static void setAxis(Vector2 axis)
           
 void setDrawAABBs(boolean drawAABBs)
           
 void setDrawBodies(boolean drawBodies)
           
 void setDrawInactiveBodies(boolean drawInactiveBodies)
           
 void setDrawJoints(boolean drawJoints)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderer

protected ShapeRenderer renderer
the immediate mode renderer to output our debug drawings


batch

public SpriteBatch batch
a spritebatch and a font for text rendering

Constructor Detail

Box2DDebugRenderer

public Box2DDebugRenderer()

Box2DDebugRenderer

public Box2DDebugRenderer(boolean drawBodies,
                          boolean drawJoints,
                          boolean drawAABBs,
                          boolean drawInactiveBodies)
Method Detail

render

public void render(World world,
                   Matrix4 projMatrix)
This assumes that the projection matrix has already been set.


isDrawBodies

public boolean isDrawBodies()

setDrawBodies

public void setDrawBodies(boolean drawBodies)

isDrawJoints

public boolean isDrawJoints()

setDrawJoints

public void setDrawJoints(boolean drawJoints)

isDrawAABBs

public boolean isDrawAABBs()

setDrawAABBs

public void setDrawAABBs(boolean drawAABBs)

isDrawInactiveBodies

public boolean isDrawInactiveBodies()

setDrawInactiveBodies

public void setDrawInactiveBodies(boolean drawInactiveBodies)

getAxis

public static Vector2 getAxis()

setAxis

public static void setAxis(Vector2 axis)

dispose

public void dispose()

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)