Table of Contents

Struct GridNavigationPortal

Namespace
GridForge.Grids.Topology
Assembly
GridForge.dll

Stores one exact, agent-independent navigation crossing compiled from two cell prisms.

public readonly struct GridNavigationPortal
Inherited Members

Remarks

The value retains no live grid state. Profile resolution uses only the stored face geometry, direction, and conservative fixed-point capacities.

Fields

SizeInBytes

The stable retained value size used by exact byte-accounted storage.

public const int SizeInBytes = 104

Field Value

int

Properties

CanonicalFacePoint

The canonical foot crossing on the shared face.

public Vector3d CanonicalFacePoint { get; }

Property Value

Vector3d

FaceKind

The orientation of the shared positive-area face.

public VoxelContactFaceKind FaceKind { get; }

Property Value

VoxelContactFaceKind

IsValid

Whether this value contains a compiled positive-area navigation face.

public bool IsValid { get; }

Property Value

bool

MaximumBodyHeight

The greatest body height supported by both directed sides of the crossing.

public Fixed64 MaximumBodyHeight { get; }

Property Value

Fixed64

MaximumHorizontalRadius

The greatest conservatively representable horizontal body radius at the crossing.

public Fixed64 MaximumHorizontalRadius { get; }

Property Value

Fixed64

SourceToTarget

The exact target-center displacement from the source center.

public Vector3d SourceToTarget { get; }

Property Value

Vector3d

VerticalFaceSegmentEnd

The second exact XZ endpoint certifying a compiled vertical face.

public Vector2d VerticalFaceSegmentEnd { get; }

Property Value

Vector2d

VerticalFaceSegmentStart

The first exact XZ endpoint certifying a compiled vertical face.

public Vector2d VerticalFaceSegmentStart { get; }

Property Value

Vector2d

Methods

TryResolveProfile(Fixed64, Fixed64, out Vector3d, out Vector3d)

Attempts to fit a fixed-point body profile and resolve its directed source and target foot anchors.

public bool TryResolveProfile(Fixed64 horizontalRadius, Fixed64 bodyHeight, out Vector3d sourceFootAnchor, out Vector3d targetFootAnchor)

Parameters

horizontalRadius Fixed64

The required nonnegative horizontal body radius.

bodyHeight Fixed64

The required positive body height.

sourceFootAnchor Vector3d

The last canonical foot anchor on the source side.

targetFootAnchor Vector3d

The first canonical foot anchor on the target side.

Returns

bool

true when the profile fits and both anchors are representable.

TryTranslate(Vector3d, out GridNavigationPortal)

Attempts to rigidly translate the canonical face point without fixed-point saturation.

public bool TryTranslate(Vector3d offset, out GridNavigationPortal translated)

Parameters

offset Vector3d

The exact translation applied to the canonical face point.

translated GridNavigationPortal

The translated portal, or default on failure.

Returns

bool

true when this portal is valid and the translated face point is representable; otherwise, false.