use building heigh in cm. TODO need to match ground resolution
This commit is contained in:
parent
c280bbaf50
commit
118c74e810
@ -87,9 +87,9 @@ public class ExtrusionLayer extends Layer {
|
|||||||
|
|
||||||
// just a guessing to make it look ok
|
// just a guessing to make it look ok
|
||||||
if (height == 0)
|
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;
|
height *= sfactor;
|
||||||
minHeight *= sfactor;
|
minHeight *= sfactor;
|
||||||
|
|
||||||
|
|||||||
@ -328,11 +328,10 @@ public class ExtrusionOverlay extends RenderOverlay {
|
|||||||
float y = (float) (tile.pixelY - mapPosition.y * div);
|
float y = (float) (tile.pixelY - mapPosition.y * div);
|
||||||
float scale = mapPosition.scale / div;
|
float scale = mapPosition.scale / div;
|
||||||
|
|
||||||
m.mvp.setTransScale(x * scale, y * scale,
|
m.mvp.setTransScale(x * scale, y * scale, scale / GLRenderer.COORD_SCALE);
|
||||||
scale / GLRenderer.COORD_SCALE);
|
|
||||||
|
|
||||||
// scale height
|
// scale height
|
||||||
m.mvp.setValue(10, scale / GLRenderer.COORD_SCALE);
|
m.mvp.setValue(10, scale / 30);
|
||||||
|
|
||||||
m.mvp.multiplyMM(m.viewproj, m.mvp);
|
m.mvp.multiplyMM(m.viewproj, m.mvp);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user