List of usage examples for com.badlogic.gdx.physics.box2d Box2DDebugRenderer Box2DDebugRenderer
public Box2DDebugRenderer(boolean drawBodies, boolean drawJoints, boolean drawAABBs, boolean drawInactiveBodies, boolean drawVelocities, boolean drawContacts)
From source file:me.scarlet.undertailor.engine.overworld.CollisionHandler.java
License:Open Source License
public CollisionHandler(OverworldCamera ovwCam, boolean renderCollision) { this.overworldCam = ovwCam; this.rendererCam = new OrthographicCamera(640, 480); this.rendererCam.zoom = 1 / OverworldController.METERS_TO_PIXELS; this.destroyed = false; this.reset(); this.renderer = new Box2DDebugRenderer(true, true, false, true, false, true); }
From source file:org.catrobat.catroid.physics.PhysicsWorld.java
License:Open Source License
public void render(Matrix4 perspectiveMatrix) { if (renderer == null) { renderer = new Box2DDebugRenderer(PhysicsDebugSettings.Render.RENDER_BODIES, PhysicsDebugSettings.Render.RENDER_JOINTS, PhysicsDebugSettings.Render.RENDER_AABB, PhysicsDebugSettings.Render.RENDER_INACTIVE_BODIES, PhysicsDebugSettings.Render.RENDER_VELOCITIES, PhysicsDebugSettings.Render.RENDER_CONTACTS); }/* w w w .j ava 2 s .c o m*/ renderer.render(world, perspectiveMatrix.scl(PhysicsWorld.RATIO)); }
From source file:org.saltosion.pixelprophecy.systems.RenderingSystem.java
License:Open Source License
public RenderingSystem(World world) { super(Family.all(Comp.RenderedObject.class, Comp.Physics.class).get()); this.world = world; camera = new OrthographicCamera(); b2dDebugRenderer = new Box2DDebugRenderer(true, true, true, true, true, true); rayHandler = new RayHandler(world); rayHandler.setBlurNum(2);//from w w w . ja va2s. com spriteBatch = new SpriteBatch(); }
From source file:vault.clockwork.system.Physics.java
License:Open Source License
/** * Ctor./*from ww w. j a v a 2 s.c o m*/ */ public Physics() { this.world = new World(new Vector2(0.f, -10.f), true); this.debugRenderer = new Box2DDebugRenderer(true, true, false, true, true, true); // apply contact listener this.world.setContactListener(this); }