ChunkPositions
A class in Root.Township, Alta.Chunks.
A location chunk's set of weighted surfaces for picking random spawn points. Held by LocationChunk.Positions; ChunkPositionSurface components add themselves to it.
- Listed in World, chunks and saving
Constructors
| Member | What it is |
|---|---|
ChunkPositions() | Creates a ChunkPositions with default values. |
Fields
Properties
| Member | What it is |
|---|---|
bool HasSurfaces { get; set; } | Whether the chunk has any position surfaces set up. |
HashSet<ChunkPositionSurface> PositionDefinitions { get; } | The surfaces registered for this chunk. Each has a weight used by GetPosition. |
Methods
| Member | What it is |
|---|---|
PointNormal? GetPosition(int iterations, float maxAngleFromUpDot) | Picks a surface at random by weight and tries it up to iterations times for a point whose normal is steep enough. Returns null if none fits. |
Used in
Members of other types that take, return or hold a ChunkPositions: