-
- All Implemented Interfaces:
public final class NearestKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> SteeringAction<T, Euclidean2DPosition>pickNearestOrFirst(List<SteeringAction<T, Euclidean2DPosition>> $self, Environment<T, Euclidean2DPosition> env, Pedestrian2D<T> pedestrian)Picks the SteeringActionWithTarget whose target is nearest to the pedestrian's current position, or the first action of the list if none of them has a defined target. -
-
Method Detail
-
pickNearestOrFirst
final static <T extends Any> SteeringAction<T, Euclidean2DPosition> pickNearestOrFirst(List<SteeringAction<T, Euclidean2DPosition>> $self, Environment<T, Euclidean2DPosition> env, Pedestrian2D<T> pedestrian)
Picks the SteeringActionWithTarget whose target is nearest to the pedestrian's current position, or the first action of the list if none of them has a defined target. If the list is empty, null is returned.
-
-
-
-