private GeoBlockComplex(GeoBlockComplex block) : base(block.getGeoX(), block.getGeoY()) { _cells = new GeoCell[GeoEngine.GEO_BLOCK_SHIFT * GeoEngine.GEO_BLOCK_SHIFT]; for (int x = 0, y; x < GeoEngine.GEO_BLOCK_SHIFT; x++) { for (y = 0; y < GeoEngine.GEO_BLOCK_SHIFT; y++) { _cells[indexOf(x, y)] = new GeoCellCM(this, block.nGetCellByLayer(x, y, 0).getHeightAndNSWE(), x, y); } } calcMaxMinHeight(); }
private GeoBlockMultiLayer(GeoBlockComplex block) : base(block.getGeoX(), block.getGeoY()) { _cells3D = new GeoCell[GeoEngine.GEO_BLOCK_SHIFT, GeoEngine.GEO_BLOCK_SHIFT][]; _cells = new GeoCell[GeoEngine.GEO_BLOCK_SHIFT * GeoEngine.GEO_BLOCK_SHIFT]; for (int x = 0; x < GeoEngine.GEO_BLOCK_SHIFT; x++) { for (int y = 0; y < GeoEngine.GEO_BLOCK_SHIFT; y++) { GeoCell cell = new GeoCellCM(this, block.nGetCellByLayer(x, y, 0).getHeightAndNSWE(), x, y); _cells3D[x, y] = new GeoCell[1]; _cells3D[x, y][0] = cell; _cells[x * GeoEngine.GEO_BLOCK_SHIFT + y] = cell; } } calcMaxMinHeight(); }