Nearest

class Nearest<T>(environment: Euclidean2DEnvironment<T>, node: Node<T>) : Filtered<T, Euclidean2DPosition>

Filtered strategy considering only the group steering action and the non-group steering action whose targets are nearest to the node's position. The two actions are combined using DistanceWeighted strategy.

Parameters

environment
the environment in which the node moves.
node
the owner of the steering action this strategy belongs to.

Constructors

Link copied to clipboard
constructor(environment: Euclidean2DEnvironment<T>, node: Node<T>)

Functions

Link copied to clipboard

Delegated to steerStrategy after filtering the given actions.

Link copied to clipboard

Computes the target to reach starting from the steering actions the node obey to, in absolute coordinates.