Table of Contents

Class SwitchStateDensity

Namespace
Shard.WorldGen.Nodes
Assembly
Shard.WorldGen.dll

Evaluates the input node with the context's switch state overridden to a fixed value. Allocates a per-call child context (thread-safe) rather than reusing an instance scratch buffer like upstream.

public sealed class SwitchStateDensity : Density
Inheritance
SwitchStateDensity
Inherited Members

Constructors

SwitchStateDensity(Density?, int)

Evaluates the input node with the context's switch state overridden to a fixed value. Allocates a per-call child context (thread-safe) rather than reusing an instance scratch buffer like upstream.

public SwitchStateDensity(Density? input, int switchState)

Parameters

input Density
switchState int

Methods

Process(Context)

public override double Process(Density.Context context)

Parameters

context Density.Context

Returns

double

SetInputs(Density[])

Wire this node's inputs (no-op for leaf nodes).

public override void SetInputs(Density[] inputs)

Parameters

inputs Density[]