SinglePrevalent
A SteeringStrategy in which one navigation action is prevalent and others are combined with a reduced weight so that the resulting force stays within a tolerance sector around the prevalent force while remaining inside the current room.
The steps are:
Identify the prevalent navigation action (must be a NavigationAction).
If the prevalent action leads outside the current room, it is used unchanged.
Otherwise, linearly combine the prevalent force (weight 1) and the other forces (weight w ∈ 0,1) and reduce w until the combined force is within the tolerance angle and keeps the node inside the room.
Apply exponential smoothing to reduce oscillations.
Parameters
the environment with navigation graph.
the node owning the steering strategy.
function selecting the prevalent NavigationAction.
tolerance angle in radians.
smoothing alpha for exponential smoothing.
function computing the maximum allowed walk distance.
minimum magnitude ratio for the resulting force.
decrement step used when searching for a suitable weight w.
Type Parameters
the concentration type.
the polygon type used by the environment's navigation graph.
Constructors
Functions
actions are partitioned in group steering actions and non-group steering actions. The overall next position for each of these two sets of actions is computed via weighted sum. The resulting vectors are then summed together (with unitary weight).
If there's no SteeringActionWithTarget among the provided actions, a zero vector is returned. Otherwise, the closest target is picked.