Table of Contents

Class GradientDensity

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

Measures the slope of the input field: finite-difference gradient over a step, reported as the angle (in degrees, 0-90) between that gradient direction and a reference axis. Allocates per-call contexts.

public sealed class GradientDensity : Density
Inheritance
GradientDensity
Inherited Members

Constructors

GradientDensity(Density?, double, Vector3d)

public GradientDensity(Density? input, double slopeRange, Vector3d axis)

Parameters

input Density
slopeRange double
axis Vector3d

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[]