Struct GridNavigationCorridorValidationCursor
Resumably validates one deterministic navigation corridor into caller-owned storage.
public struct GridNavigationCorridorValidationCursor
- Inherited Members
Remarks
The ordered cell and waypoint spans are not retained. Their lengths and contents must remain stable between calls. A successful corridor of N cells consumes exactly 2N+1 work units. Advance one work unit at a time and call TryGetCurrentPortal(out GridNavigationPortal) after each call to consume every portal certificate in order.
Constructors
GridNavigationCorridorValidationCursor(int, Vector3d, Vector3d, Fixed64, Fixed64)
Creates a cursor for one ordered source, witness, and destination cell chain.
public GridNavigationCorridorValidationCursor(int cellCount, Vector3d entryAnchor, Vector3d exitAnchor, Fixed64 radiusClearance, Fixed64 heightClearance)
Parameters
cellCountintThe stable number of ordered cells supplied to every advance.
entryAnchorVector3dThe source-cell foot anchor.
exitAnchorVector3dThe destination-cell foot anchor.
radiusClearanceFixed64The required nonnegative horizontal body radius.
heightClearanceFixed64The required positive body height.
Properties
GeometricCost
The checked canonical polyline length accumulated so far.
public readonly Fixed64 GeometricCost { get; }
Property Value
- Fixed64
PortalWaypointCount
The number of canonical waypoints written, or zero after failure.
public readonly int PortalWaypointCount { get; }
Property Value
Status
The current validation state.
public readonly GridNavigationCorridorValidationStatus Status { get; }
Property Value
Methods
Advance(ReadOnlySpan<GridCellPrism>, Span<Vector3d>, int)
Performs at most maxWork bounded validation units.
public GridNavigationCorridorValidationStatus Advance(ReadOnlySpan<GridCellPrism> orderedCells, Span<Vector3d> portalWaypoints, int maxWork)
Parameters
orderedCellsReadOnlySpan<GridCellPrism>The unchanged ordered cells supplied for this cursor.
portalWaypointsSpan<Vector3d>Caller-owned storage for twice the portal count.
maxWorkintThe nonnegative maximum number of work units to perform.
Returns
- GridNavigationCorridorValidationStatus
The resulting validation state.
TryGetCurrentPortal(out GridNavigationPortal)
Attempts to get the portal certificate produced by the last completed work unit.
public readonly bool TryGetCurrentPortal(out GridNavigationPortal portal)
Parameters
portalGridNavigationPortalThe produced portal, or default when unavailable.
Returns
Remarks
The value is available only when the final work unit completed by the most recent advance was successful portal work. Use a one-unit budget to consume every certificate in order.