Table of Contents

Class Density.Context

Namespace
Shard.WorldGen
Assembly
Shard.WorldGen.dll

The per-sample evaluation context threaded through the graph: the sample position plus optional terrain/biome state. Heavier provider/graph fields from upstream are added as those subsystems land.

public sealed class Density.Context
Inheritance
Density.Context
Inherited Members

Constructors

Context()

public Context()

Context(Context)

public Context(Density.Context other)

Parameters

other Density.Context

Fields

DensityAnchor

public Vector3d? DensityAnchor

Field Value

Vector3d?

DistanceFromCellWall

public double DistanceFromCellWall

Field Value

double

DistanceToBiomeEdge

public double DistanceToBiomeEdge

Field Value

double

GraphNode

The active graph node (graph subsystem, S4). Opaque until the graph engine lands; kept so the context shape matches upstream and graph-aware nodes can thread it through.

public object? GraphNode

Field Value

object

Position

public Vector3d Position

Field Value

Vector3d

PositionsAnchor

public Vector3d? PositionsAnchor

Field Value

Vector3d?

SwitchState

public int SwitchState

Field Value

int

TerrainDensityProvider

Samples the (already-built) terrain density at a world position — used by the TerrainDensity node so material providers can look up neighbour density. Null outside the material pass. Mirrors upstream Context.terrainDensityProvider.

public Func<Vector3d, double>? TerrainDensityProvider

Field Value

Func<Vector3d, double>

Methods

Assign(Context)

public void Assign(Density.Context other)

Parameters

other Density.Context