Nearest
class Nearest<T>(environment: Euclidean2DEnvironment<T>, node: Node<T>) : Filtered<T, Euclidean2DPosition>
Strategy that considers the group steering action (if present) and the nearest non-group steering action, then combines them using a DistanceWeighted strategy.
Parameters
environment
the environment in which the node moves.
node
the owner of the steering action this strategy belongs to.
Type Parameters
T
the concentration type.
Functions
Link copied to clipboard
open override fun computeNextPosition(actions: List<SteeringAction<T, Euclidean2DPosition>>): Euclidean2DPosition
Delegates to steerStrategy after applying filter to actions.
Link copied to clipboard
open override fun computeTarget(actions: List<SteeringAction<T, Euclidean2DPosition>>): Euclidean2DPosition
Computes the absolute target position derived from the provided steering actions.