Package com.deco2800.game.rendering
Class DebugRenderer
java.lang.Object
com.deco2800.game.rendering.DebugRenderer
Provides functionality to draw lines/shapes to the screen for debug purposes.
- 
Constructor Summary
ConstructorsConstructorDescriptionDebugRenderer(com.badlogic.gdx.physics.box2d.Box2DDebugRenderer physicsRenderer, com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer)  - 
Method Summary
Modifier and TypeMethodDescriptionvoiddrawLine(com.badlogic.gdx.math.Vector2 from, com.badlogic.gdx.math.Vector2 to) Draw a line between two positionsvoiddrawLine(com.badlogic.gdx.math.Vector2 from, com.badlogic.gdx.math.Vector2 to, com.badlogic.gdx.graphics.Color color, float lineWidth) Draw a line between two positionsvoiddrawRectangle(com.badlogic.gdx.math.Vector2 pos, com.badlogic.gdx.math.Vector2 size) Draw a rectanglevoiddrawRectangle(com.badlogic.gdx.math.Vector2 pos, com.badlogic.gdx.math.Vector2 size, com.badlogic.gdx.graphics.Color color, float lineWidth) Draw a rectanglebooleanvoidrender(com.badlogic.gdx.math.Matrix4 projMatrix) voidrenderPhysicsWorld(com.badlogic.gdx.physics.box2d.World physicsWorld) voidsetActive(boolean active)  
- 
Constructor Details
- 
DebugRenderer
public DebugRenderer() - 
DebugRenderer
public DebugRenderer(com.badlogic.gdx.physics.box2d.Box2DDebugRenderer physicsRenderer, com.badlogic.gdx.graphics.glutils.ShapeRenderer shapeRenderer)  
 - 
 - 
Method Details
- 
renderPhysicsWorld
public void renderPhysicsWorld(com.badlogic.gdx.physics.box2d.World physicsWorld)  - 
drawLine
public void drawLine(com.badlogic.gdx.math.Vector2 from, com.badlogic.gdx.math.Vector2 to) Draw a line between two positions- Parameters:
 from- start positionto- end position
 - 
drawLine
public void drawLine(com.badlogic.gdx.math.Vector2 from, com.badlogic.gdx.math.Vector2 to, com.badlogic.gdx.graphics.Color color, float lineWidth) Draw a line between two positions- Parameters:
 from- start positionto- end positioncolor- line colorlineWidth- line width
 - 
drawRectangle
public void drawRectangle(com.badlogic.gdx.math.Vector2 pos, com.badlogic.gdx.math.Vector2 size) Draw a rectangle- Parameters:
 pos- position of bottom left cornersize- width/height
 - 
drawRectangle
public void drawRectangle(com.badlogic.gdx.math.Vector2 pos, com.badlogic.gdx.math.Vector2 size, com.badlogic.gdx.graphics.Color color, float lineWidth) Draw a rectangle- Parameters:
 pos- position of bottom left cornersize- width/heightcolor- line colorlineWidth- line width
 - 
setActive
public void setActive(boolean active) - Parameters:
 active- true to enable debug drawing, false to disable
 - 
getActive
public boolean getActive() - 
render
public void render(com.badlogic.gdx.math.Matrix4 projMatrix)  
 -