List of usage examples for com.badlogic.gdx.math Rectangle getPosition
public Vector2 getPosition(Vector2 position)
From source file:com.me.mygdxgame.WallActor.java
License:Apache License
private void boundsToM(Rectangle boundsPix, PolygonShape rectangleShape) { Vector2 halfSizeM = new Vector2(), centerM = new Vector2(); boundsPix.getPosition(centerM); centerM.div(gdxTest.getPixelsPerMeter()); boundsPix.getPosition(centerM);// w ww. j ava2s.com centerM.div(gdxTest.getPixelsPerMeter()); rectangleShape.setAsBox(halfSizeM.x, halfSizeM.y, centerM, 0f); }
From source file:uk.josephmansfield.interplanar.CollisionBody.java
License:Open Source License
public CollisionBody(Rectangle boundingRectangle) { boundingRectangle.getPosition(position); dimensions.set(boundingRectangle.getWidth(), boundingRectangle.getHeight()); }