PointNormal
A struct in Root.Township, Alta.Forests.
A point on the ground with its normal, plus cached info about the nearest forest edge and biome. Passed through forest spawning and spawn modifiers.
- Listed in World generation
- Derived types
SpawnModifierPointNormal
Constructors
| Member | What it is |
|---|---|
PointNormal(PointEdge pointEdge, float y, Vector3 normal) | Creates a PointNormal from point and normal. |
PointNormal(Vector3 point, Vector3 normal) | Creates a PointNormal from point and normal. |
Fields
| Member | What it is |
|---|---|
BiomeSphere biome | The biome sphere this point is in, if one has been set. |
float edgeDistance | Cached distance to nearestEdge; only valid once the edge is set. |
float edgeProgress | Cached position along nearestEdge (0 to 1). |
bool isHit | Whether this point came from a valid ground hit. Both constructors set it true. |
Edge nearestEdge | Cached nearest edge, or null until worked out. |
Vector3 normal | The ground normal at the point. |
Vector3 point | The world position. |
Methods
| Member | What it is |
|---|---|
Edge GetEdge(ForestGeneration forest) | The nearest forest edge, worked out and cached on first call. |
float GetEdgeDistance(ForestGeneration forest) | Distance to the nearest forest edge, worked out and cached on first call. |
Used in
Members of other types that take, return or hold a PointNormal:
ChunkPositions.GetPosition, ChunkPositionSurface.GetPosition, PositionSurfaceDefinition.GetPoint, CliffFill.Raycasts, ForestFillCore.Raycasts, ForestPopulationArea.GetPoint, SpawnModifiers.Process, SpawnParameters.SpawnParameters, IPointNormalEvaluator.GetPoint, PopulationRaycast.Try, RadialPopulationArea.GetPoint, BiomeSwitchFilter.Filter, ElevationFromPath.Filter, HeightFilter.Filter, HeightProgressFilter.Filter, InsetModifier.Filter, NormalFilter.Filter, PopulationPath.GetPoint, RandomCutPointNormalFilter.Filter, SpawnModifierPointNormalRedirect.Filter, SphereCastFilter.Filter.