Filtered

open class Filtered<T, P : Position<P>, Vector<P>>(steerStrategy: SteeringStrategy<T, P>, filter: List<SteeringAction<T, P>>.() -> List<SteeringAction<T, P>>) : SteeringStrategy<T, P> (source)

SteeringStrategy decorator applying a filter to the list of steering actions (see computeNextPosition).

Parameters

steerStrategy
computeNextPosition is delegated to this strategy.
filter
the filter to apply on the list of steering actions.

Inheritors

Constructors

Link copied to clipboard
constructor(steerStrategy: SteeringStrategy<T, P>, filter: List<SteeringAction<T, P>>.() -> List<SteeringAction<T, P>>)

Functions

Link copied to clipboard
open override fun computeNextPosition(actions: List<SteeringAction<T, P>>): P

Delegated to steerStrategy after filtering the given actions.

Link copied to clipboard
open override fun computeTarget(actions: List<SteeringAction<T, P>>): P

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