TravelHandle3D

Mutable handle representing an in-progress interruptible 3D travel. The 3D analog of TravelHandle. Same semantics: returned by startTravel3D; consumed by awaitTravel3D; cancellable / redirectable from any coroutine with a reference to the handle.

Latency for interruption is stepSize / velocity at most (one step boundary). See §12.6 of the agent-based-modeling design doc for use cases (drone recall, mid-flight reroute on weather, etc.).

Properties

Link copied to clipboard
val agent: A
Link copied to clipboard

Current target. May differ from the original after redirect.

Link copied to clipboard

Cumulative 3D distance the agent has moved through the volume since startedAt.

Link copied to clipboard

End time of the travel — Double.NaN while still active.

Link copied to clipboard

True while the travel is in progress (not yet complete or canceled).

Link copied to clipboard

True after cancel is called.

Link copied to clipboard

True after a successful arrival at the (possibly redirected) destination.

Link copied to clipboard

TravelResult snapshot.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun cancel()

Stop motion at the agent's current interpolated 3D position.

Link copied to clipboard
fun redirect(newDestination: Point3D)

Change the destination mid-travel.