Removed 'near' field

This commit is contained in:
Collin Smith 2019-10-17 16:20:48 -07:00
parent 7ca9e73941
commit 4f5852b35a

View File

@ -121,7 +121,6 @@ public class CameraTool extends ApplicationAdapter {
final Vector2 vec2 = new Vector2();
final Vector2 loc = new Vector2();
final Vector2 pos = new Vector2();
//final Vector2 near = new Vector2();
final Vector2 tmp = new Vector2();
final StringBuilder builder = new StringBuilder();
@ -174,25 +173,14 @@ public class CameraTool extends ApplicationAdapter {
vec2.set(Gdx.input.getX(), Gdx.input.getY());
iso.unproject(vec2);
iso.toWorld(vec2);
// near.set(vec2);
iso.toTile(vec2);
loc.set(vec2);
iso.toScreen(vec2);
// iso.toTile50(near);
// tmp.set(near);
// iso.toScreen(tmp);
shapes.set(ShapeRenderer.ShapeType.Filled);
shapes.setColor(Color.SALMON);
DebugUtils.drawDiamond(shapes, vec2.x, vec2.y - Tile.SUBTILE_HEIGHT50, Tile.SUBTILE_WIDTH, Tile.SUBTILE_HEIGHT);
// shapes.set(ShapeRenderer.ShapeType.Line);
// if (!tmp.epsilonEquals(vec2)) {
// shapes.setColor(Color.SKY);
// DebugUtils.drawDiamond(shapes, tmp.x, tmp.y - Tile.SUBTILE_HEIGHT50, Tile.SUBTILE_WIDTH, Tile.SUBTILE_HEIGHT);
// }
shapes.set(ShapeRenderer.ShapeType.Filled);
shapes.setColor(Color.GREEN);
shapes.rect(vec2.x - 0.5f, vec2.y - 0.5f, 1, 1);
@ -218,7 +206,6 @@ public class CameraTool extends ApplicationAdapter {
.append("pos:").append('\n')
.append("cursor:").append('\n')
.append("px:").append('\n')
// .append("near:").append('\n')
;
GlyphLayout layout = font.draw(batch, builder.toString(), 0, Gdx.graphics.getHeight());
width = layout.width;
@ -228,7 +215,6 @@ public class CameraTool extends ApplicationAdapter {
.append(pos).append('\n')
.append(loc).append('\n')
.append(vec2).append('\n')
// .append(near).append('\n')
;
font.draw(batch, builder.toString(), width, Gdx.graphics.getHeight());
batch.end();