5cm height step should suffice

This commit is contained in:
Hannes Janetzek 2013-04-03 02:11:44 +02:00
parent 118c74e810
commit 1d2fea48cc
2 changed files with 5 additions and 4 deletions

View File

@ -85,11 +85,12 @@ public class ExtrusionLayer extends Layer {
float height = way.height; float height = way.height;
float minHeight = way.minHeight; float minHeight = way.minHeight;
// just a guessing to make it look ok // 12m default
if (height == 0) if (height == 0)
height = 14 * 100; height = 12 * 100;
float sfactor = (400f / Tile.TILE_SIZE) / 2f; // 5 cm steps
float sfactor = (400f / Tile.TILE_SIZE) / 5f;
height *= sfactor; height *= sfactor;
minHeight *= sfactor; minHeight *= sfactor;

View File

@ -331,7 +331,7 @@ public class ExtrusionOverlay extends RenderOverlay {
m.mvp.setTransScale(x * scale, y * scale, scale / GLRenderer.COORD_SCALE); m.mvp.setTransScale(x * scale, y * scale, scale / GLRenderer.COORD_SCALE);
// scale height // scale height
m.mvp.setValue(10, scale / 30); m.mvp.setValue(10, scale / 10);
m.mvp.multiplyMM(m.viewproj, m.mvp); m.mvp.multiplyMM(m.viewproj, m.mvp);