Table of Contents

Class AnchorUtilities

Namespace
Pinwheel.Vista
Assembly
Pinwheel.Vista.Runtime.dll

Provides polygon-anchor helpers used by Local Procedural Biome authoring.

public static class AnchorUtilities
Inheritance
AnchorUtilities
Inherited Members

Remarks

These helpers operate on the ordered anchor arrays that define biome polygons and their falloff outlines. They are primarily used to insert or remove anchors, derive falloff polygons, and align authored points to world-space terrain geometry.

Methods

FlattenY(Vector3[], float)

Forces every anchor in an array to the same Y coordinate.

GetFalloff(Vector3[], float, FalloffDirection)

Builds a falloff polygon by offsetting each anchor along the averaged corner normal.

GetInsertIndex(List<Vector3>, Vector3)

Finds the insertion index that best preserves the current polygon order for a new anchor.

Insert(Vector3[], Vector3)

Inserts a new anchor into an ordered anchor loop at the segment whose midpoint is closest to the new point.

Remove(Vector3[], Vector3)

Removes the first matching anchor from an anchor array copy.

RemoveAt(Vector3[], int)

Removes the anchor at a specific index from an anchor array copy.

SnapToWorld(Vector3)

Snaps one anchor to the first collider hit below it and returns the adjusted point.

SnapToWorld(Vector3[])

Snaps every anchor in an array to the first collider hit below it.

Transform(Vector3[], Matrix4x4)

Transforms every anchor in place by a matrix.