RiverGeneration
A class in Root.Township, Alta.Forests.
The river network for a forest: nodes, the overground paths and waterfalls. It can be cached and rebuilt from the cache.
- Listed in World generation
- Inherits or implements
ICacheable
Constructors
| Member | What it is |
|---|---|
RiverGeneration(ForestGeneration forest, float overgroundVolumeThreshold, float nodeWidthMultiplier, float maxVolume) | Creates a RiverGeneration from forest. |
RiverGeneration(ForestGeneration forest) | Creates a RiverGeneration from forest. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private float maxVolume | Backing field for MaxVolume. |
private List<RiverNode> nodes | Backing list for Nodes and WorkingNodes. |
private float nodeWidthMultiplier | Backing field for NodeWidthMultiplier. |
private List<RiverPath> overground | Backing list for Overground: outgoing paths of nodes that aren't underground. |
private float overgroundVolumeThreshold | Backing field for OvergroundVolumeThreshold. |
private List<Waterfall> waterfalls | Backing list for Waterfalls. |
Properties
| Member | What it is |
|---|---|
ForestGeneration Forest { get; } | The forest generation it belongs to. |
float MaxVolume { get; } | Largest water volume, probably used to scale river width. |
IReadOnlyList<RiverNode> Nodes { get; } | All river nodes. |
float NodeWidthMultiplier { get; } | Multiplier from volume to river width, probably. |
IEnumerable<RiverPath> Overground { get; } | River paths that run above ground. |
float OvergroundVolumeThreshold { get; } | Volume at which a river comes above ground, probably. |
IEnumerable<Waterfall> Waterfalls { get; } | Waterfalls along the rivers. |
List<RiverNode> WorkingNodes { get; } | The node list itself, for generation steps to edit. |
List<RiverPath> WorkingOverground { get; } | The overground path list itself, for editing. |
List<Waterfall> WorkingWaterfalls { get; } | The waterfall list itself, for editing. |
1 private and internal property
Methods
1 private and internal method
| Member | What it is |
|---|---|
private Task Alta.Static.ICacheable.SerializeAsync(uint version, Stream stream) | Explicit ICacheable implementation: writes or reads river nodes, their outgoing paths and waterfalls, then rebuilds volumes and the overground list. |
Used in
Members of other types that take, return or hold a RiverGeneration: