use building heigh in cm. TODO need to match ground resolution

This commit is contained in:
Hannes Janetzek 2013-04-03 01:06:58 +02:00
parent c280bbaf50
commit 118c74e810
2 changed files with 4 additions and 5 deletions

View File

@ -87,9 +87,9 @@ public class ExtrusionLayer extends Layer {
// just a guessing to make it look ok
if (height == 0)
height = 14;
height = 14 * 100;
float sfactor = GLRenderer.COORD_SCALE * (400f / Tile.TILE_SIZE);
float sfactor = (400f / Tile.TILE_SIZE) / 2f;
height *= sfactor;
minHeight *= sfactor;

View File

@ -328,11 +328,10 @@ public class ExtrusionOverlay extends RenderOverlay {
float y = (float) (tile.pixelY - mapPosition.y * div);
float scale = mapPosition.scale / div;
m.mvp.setTransScale(x * scale, y * scale,
scale / GLRenderer.COORD_SCALE);
m.mvp.setTransScale(x * scale, y * scale, scale / GLRenderer.COORD_SCALE);
// scale height
m.mvp.setValue(10, scale / GLRenderer.COORD_SCALE);
m.mvp.setValue(10, scale / 30);
m.mvp.multiplyMM(m.viewproj, m.mvp);