public void GetBounds(ref Vector2 min, ref Vector2 max) { min.X = GeoEngine.getWorldX(_minGeoX); min.Y = GeoEngine.getWorldY(_minGeoY); max.X = GeoEngine.getWorldX(_maxGeoX); max.Y = GeoEngine.getWorldY(_maxGeoY); // MAY need to add +1 to max geo values to get outer edge }
private IEnumerable <GeoModel> createBlock(GeoBlock block) { float ox, oy, oz; if (block.getType() == GEO.GEO_BLOCK_TYPE_FLAT) { GeoCell cell = block.nGetCell(0, 0, 0); // float xx = GEO.getWorldX(cell.getGeoX()); float yy = GEO.getWorldY(cell.getGeoY()); float zz = GEO.getHeight(cell.getHeight()); yield return(appendModel(xx, zz, yy, true)); } else if (block.getType() == GEO.GEO_BLOCK_TYPE_COMPLEX) { GeoModel m; GeoCell cell; GeoCell[] cells = block.getCells(); int c = cells.Length; for (int i = 0; i < c; i++) { cell = cells[i]; ox = GEO.getWorldX(cell.getGeoX()); oz = GEO.getWorldY(cell.getGeoY()); oy = GEO.getHeight(cell.getHeight()); m = appendModel(ox, oy, oz, false); updateMask(m, cell); yield return(m); } } else if (block.getType() == GEO.GEO_BLOCK_TYPE_MULTILAYER) { int c = block.getMaxLayerCount(); // GeoModel m; int x, y; int min_x = block.getGeoX(); int max_x = block.getMaxGeoX(); int min_y = block.getGeoY(); int max_y = block.getMaxGeoY(); for (y = min_y; y <= max_y; y++) { for (x = min_x; x <= max_x; x++) { GeoCell[] cells = block.nGetLayers(x, y); foreach (GeoCell cell in cells) { ox = GEO.getWorldX(cell.getGeoX()); oz = GEO.getWorldY(cell.getGeoY()); oy = GEO.getHeight(cell.getHeight()); m = appendModel(ox, oy, oz, false); updateMask(m, cell); yield return(m); } } } } }