public void Dirty(RGDataSource data, bool dirty) { int expand = 1 << LOD; for (int x = xIndex; x < xIndex + expand; x++) { for (int z = zIndex; z < zIndex + expand; z++) { RGChunk gc = data.Node(x, z); if (gc != null) { gc.Dirty = dirty; } } } }
public bool IsDirty(RGDataSource data) { int expand = 1 << LOD; for (int x = xIndex; x < xIndex + expand; x++) { for (int z = zIndex; z < zIndex + expand; z++) { RGChunk gc = data.Node(x, z); if (gc != null && gc.Dirty) { return(true); } } } return(false); }
public List <RGChunk> GetChunks(RGDataSource data) { List <RGChunk> gc_list = new List <RGChunk>(); int expand = 1 << LOD; for (int x = xIndex; x < xIndex + expand; x++) { for (int z = zIndex; z < zIndex + expand; z++) { RGChunk gc = data.Node(x, z); if (gc == null) { continue; } gc_list.Add(gc); } } return(gc_list); }