set default building height in VectorTileLoader

This commit is contained in:
Hannes Janetzek 2014-02-16 16:08:11 +01:00
parent 904360ff69
commit 46ad2be83b
2 changed files with 6 additions and 10 deletions

View File

@ -446,6 +446,11 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
l = new ExtrusionLayer(0, groundScale, extrusion.colors);
mTile.layers.setExtrusionLayers(l);
}
/* 12m default */
if (height == 0)
height = 12 * 100;
l.add(mElement, height, minHeight);
}

View File

@ -86,10 +86,6 @@ public class ExtrusionLayer extends RenderElement {
short[] index = element.index;
float[] points = element.points;
// 12m default
if (height == 0)
height = 12 * 100;
// 10 cm steps
float sfactor = 1 / 10f;
height *= sfactor;
@ -100,17 +96,12 @@ public class ExtrusionLayer extends RenderElement {
height /= mGroundResolution;
minHeight /= mGroundResolution;
// my preference
height *= 0.85;
minHeight *= 0.85;
int length = 0, ipos = 0, ppos = 0;
boolean complexOutline = false;
boolean simpleOutline = true;
// current vertex id
int startVertex = mNumVertices;
int length = 0, ipos = 0, ppos = 0;
for (int n = index.length; ipos < n; ipos++, ppos += length) {
length = index[ipos];