|
|
int | CompareTo (ChunkCreationData other) |
|
virtual int | GetLevelCount () |
| | Override to specify the number of generation levels in the layer. Default is 1.
|
|
int | GetLevelCount () |
| void | HandleAllAbstractChunks (int minChunkLevel, Action< AbstractLayerChunk > func) |
| | Handle all loaded chunks.
|
| void | HandleDependenciesForLevel (int level, Action< LayerDependency > func) |
| | Handle all layer dependencies.
|
| bool | IsLoadedAtPosition (DPoint position) |
| | Returns true if the layer is loaded at the highest level at the specified position in world units.
|
| bool | IsLoadedAtPosition (DPoint position, int level) |
| | Returns true if the layer is loaded at least up to level at the specified position in world units.
|
|
|
void | AddLayerDependency (int ownLevel, LayerDependency dependency) |
| | Call from constructor to add a dependency on another layer. The dependency is added to the specified ownLevel of the current layer.
|
|
void | AddLayerDependency (LayerDependency dependency) |
| | Call from constructor to add a dependency on another layer. The dependency is added to the lowest level of the current layer.
|
| | ChunkBasedDataLayer (int rollingGridWidth=32, int rollingGridHeight=0, int rollingGridMaxOverlap=3) |
| | The layer constructor in inherited classes can be used to setup dependencies on other layers.
|
|
bool | GetChunkOfGridPoint (ILC q, int x, int y, int chunkGridW, int chunkGridH, out C chunk, out Point localPointInChunk) |
| | Assuming an infinite grid with a resolution per chunk of chunkGridW by chunkGridH , output the chunk and localPointInChunk of the given global point. If iterating over many grid points, consider instead using HandleGridPoints.
|
|
bool | GetChunkOfGridPoint (ILC q, Point gridPoint, Point chunkGridSize, out C chunk, out Point localPointInChunk) |
| | Assuming an infinite grid with a resolution per chunk of chunkGridSize , output the chunk and localPointInChunk of the given global gridPoint . If iterating over many grid points, consider instead using HandleGridPoints.
|
|
void | HandleAllChunks (int minChunkLevel, Action< C > func) |
| | Handle all loaded chunks.
|
|
void | HandleChunksInBounds (ILC q, GridBounds worldBounds, int minChunkLevel, Action< C > func) |
| | Handle chunks that overlap the given worldBounds specified in world units.
|
|
delegate void | HandleGridPointInChunk (C chunk, Point localPointInChunk, Point globalPoint) |
|
void | HandleGridPoints (ILC q, GridBounds gridBounds, Point chunkGridSize, HandleGridPointInChunk handler, bool callForNullChunks=false) |
| | Assuming an infinite grid with a resolution per chunk of chunkGridSize , call the handler function once for each of the grid points within the gridBounds . This is more efficient than calling GetChunkOfGridPoint for each grid point.
|
| bool | TryGetChunk (Point index, out C chunk, int level=0) |
| | Try to get the chunk at the specified index.
|
|
void | WarnAboutMissingDependencies (ILC q, GridBounds requested) |
| | Call this method if a chunk q has called methods that rely on other chunks that are not currently generated. Based on the bounds of q and the requested world bounds of the current layer, the method will calculate which layer dependency has to be added to ensure the required chunks are generated in time.
|
In a layer-and-chunk pair of classes, the layer inherits from this class.
- Template Parameters
-
| L | The layer class itself. |
| C | The corresponding chunk class. |