Skip to main content

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.

Constructors​

MemberWhat 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
MemberWhat it is
private float maxVolumeBacking field for MaxVolume.
private List<RiverNode> nodesBacking list for Nodes and WorkingNodes.
private float nodeWidthMultiplierBacking field for NodeWidthMultiplier.
private List<RiverPath> overgroundBacking list for Overground: outgoing paths of nodes that aren't underground.
private float overgroundVolumeThresholdBacking field for OvergroundVolumeThreshold.
private List<Waterfall> waterfallsBacking list for Waterfalls.

Properties​

MemberWhat 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
MemberWhat it is
private uint Alta.Static.ICacheable.Version { get; }Cache format version, 1.

Methods​

1 private and internal method
MemberWhat 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: