Package org.arakhne.afc.agentmotion
Interface EvadingMotionAlgorithm
-
- All Known Implementing Classes:
EvadingAlgorithm
public interface EvadingMotionAlgorithm
Agent is changing its position for evading the target vector.Evading is fleeing a target position by predicting its next position.
- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:51
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- agentmotion
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vector2D<?,?>
calculate(Point2D<?,?> position, double linearSpeed, double maxLinear, Point2D<?,?> targetPosition, Vector2D<?,?> targetLinearMotion)
Calculate the linear motion for evading the given target point.Point2D<?,?>
predictTargetPosition(Point2D<?,?> targetPosition, Vector2D<?,?> targetLinearMotion)
Predict the next position of the target.
-
-
-
Method Detail
-
calculate
@Pure Vector2D<?,?> calculate(Point2D<?,?> position, double linearSpeed, double maxLinear, Point2D<?,?> targetPosition, Vector2D<?,?> targetLinearMotion)
Calculate the linear motion for evading the given target point.- Parameters:
position
- is the current position of the entity.linearSpeed
- is the current linear speed of the entity.maxLinear
- is the maximal linear speed or acceleration of the entity.targetPosition
- is the position of the target.targetLinearMotion
- is the linear motion of the target.- Returns:
- the agent motion.
-
predictTargetPosition
@Pure Point2D<?,?> predictTargetPosition(Point2D<?,?> targetPosition, Vector2D<?,?> targetLinearMotion)
Predict the next position of the target.- Parameters:
targetPosition
- is the position of the target.targetLinearMotion
- is the linear motion of the target.- Returns:
- the predicted position.
-
-