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>

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.

Constructors

Link copied to clipboard
fun <T, P : Position<P>, Vector<P>> Filtered(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 pedestrian obey to, in absolute coordinates.

Inheritors

Link copied to clipboard