// Token: 0x06000E02 RID: 3586 RVA: 0x00062570 File Offset: 0x00060970 public static void getSplatmapVertices(Bounds worldBounds, Landscape.LandscapeGetSplatmapVerticesHandler callback) { if (callback == null) { return; } LandscapeBounds landscapeBounds = new LandscapeBounds(worldBounds); for (int i = landscapeBounds.min.x; i <= landscapeBounds.max.x; i++) { for (int j = landscapeBounds.min.y; j <= landscapeBounds.max.y; j++) { LandscapeCoord landscapeCoord = new LandscapeCoord(i, j); if (Landscape.getTile(landscapeCoord) != null) { SplatmapBounds splatmapBounds = new SplatmapBounds(landscapeCoord, worldBounds); for (int k = splatmapBounds.min.x; k <= splatmapBounds.max.x; k++) { for (int l = splatmapBounds.min.y; l <= splatmapBounds.max.y; l++) { SplatmapCoord splatmapCoord = new SplatmapCoord(k, l); Vector3 worldPosition = Landscape.getWorldPosition(landscapeCoord, splatmapCoord); callback(landscapeCoord, splatmapCoord, worldPosition); } } } } } }
// Token: 0x06000DFE RID: 3582 RVA: 0x00061FD4 File Offset: 0x000603D4 public static void readSplatmap(Bounds worldBounds, Landscape.LandscapeReadSplatmapHandler callback) { if (callback == null) { return; } LandscapeBounds landscapeBounds = new LandscapeBounds(worldBounds); for (int i = landscapeBounds.min.x; i <= landscapeBounds.max.x; i++) { for (int j = landscapeBounds.min.y; j <= landscapeBounds.max.y; j++) { LandscapeCoord landscapeCoord = new LandscapeCoord(i, j); LandscapeTile tile = Landscape.getTile(landscapeCoord); if (tile != null) { SplatmapBounds splatmapBounds = new SplatmapBounds(landscapeCoord, worldBounds); for (int k = splatmapBounds.min.x; k < splatmapBounds.max.x; k++) { for (int l = splatmapBounds.min.y; l < splatmapBounds.max.y; l++) { SplatmapCoord splatmapCoord = new SplatmapCoord(k, l); for (int m = 0; m < Landscape.SPLATMAP_LAYERS; m++) { Landscape.SPLATMAP_LAYER_BUFFER[m] = tile.sourceSplatmap[k, l, m]; } Vector3 worldPosition = Landscape.getWorldPosition(landscapeCoord, splatmapCoord); callback(landscapeCoord, splatmapCoord, worldPosition, Landscape.SPLATMAP_LAYER_BUFFER); } } } } } }
// Token: 0x06000E00 RID: 3584 RVA: 0x00062290 File Offset: 0x00060690 public static void writeSplatmap(Bounds worldBounds, Landscape.LandscapeWriteSplatmapHandler callback) { if (callback == null) { return; } LandscapeBounds landscapeBounds = new LandscapeBounds(worldBounds); for (int i = landscapeBounds.min.x; i <= landscapeBounds.max.x; i++) { for (int j = landscapeBounds.min.y; j <= landscapeBounds.max.y; j++) { LandscapeCoord landscapeCoord = new LandscapeCoord(i, j); LandscapeTile tile = Landscape.getTile(landscapeCoord); if (tile != null) { if (!Landscape.splatmapTransactions.ContainsKey(landscapeCoord)) { LandscapeSplatmapTransaction landscapeSplatmapTransaction = new LandscapeSplatmapTransaction(tile); DevkitTransactionManager.recordTransaction(landscapeSplatmapTransaction); Landscape.splatmapTransactions.Add(landscapeCoord, landscapeSplatmapTransaction); } SplatmapBounds splatmapBounds = new SplatmapBounds(landscapeCoord, worldBounds); for (int k = splatmapBounds.min.x; k <= splatmapBounds.max.x; k++) { for (int l = splatmapBounds.min.y; l <= splatmapBounds.max.y; l++) { SplatmapCoord splatmapCoord = new SplatmapCoord(k, l); for (int m = 0; m < Landscape.SPLATMAP_LAYERS; m++) { Landscape.SPLATMAP_LAYER_BUFFER[m] = tile.sourceSplatmap[k, l, m]; } Vector3 worldPosition = Landscape.getWorldPosition(landscapeCoord, splatmapCoord); callback(landscapeCoord, splatmapCoord, worldPosition, Landscape.SPLATMAP_LAYER_BUFFER); for (int n = 0; n < Landscape.SPLATMAP_LAYERS; n++) { tile.sourceSplatmap[k, l, n] = Mathf.Clamp01(Landscape.SPLATMAP_LAYER_BUFFER[n]); } } } tile.data.SetAlphamaps(0, 0, tile.sourceSplatmap); } } } }