Class ArrivingKinematicAlgorithm
- java.lang.Object
-
- org.arakhne.afc.agentmotion.kinematic.ArrivingKinematicAlgorithm
-
- All Implemented Interfaces:
Serializable,Cloneable,ArrivingMotionAlgorithm
public class ArrivingKinematicAlgorithm extends Object implements ArrivingMotionAlgorithm, Serializable, Cloneable
Agent is changing its position for arriving (stopping) the target point.This algorithm uses speeds.
- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:51
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- agentmotion
-
-
Field Summary
Fields Modifier and Type Field Description protected doublestopSquaredDistanceSquare distance to the target under which the agent could stop.
-
Constructor Summary
Constructors Constructor Description ArrivingKinematicAlgorithm(double stopDistance)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector2D<?,?>calculate(Point2D<?,?> position, double linearSpeed, double maxLinearSpeed, Point2D<?,?> target)Calculate the linear motion for arriving the target point.ArrivingKinematicAlgorithmclone()Clone this algorithm.
-
-
-
Method Detail
-
clone
@Pure public ArrivingKinematicAlgorithm clone()
Description copied from interface:ArrivingMotionAlgorithmClone this algorithm.- Specified by:
clonein interfaceArrivingMotionAlgorithm- Overrides:
clonein classObject- Returns:
- the clone.
-
calculate
public Vector2D<?,?> calculate(Point2D<?,?> position, double linearSpeed, double maxLinearSpeed, Point2D<?,?> target)
Description copied from interface:ArrivingMotionAlgorithmCalculate the linear motion for arriving the target point.- Specified by:
calculatein interfaceArrivingMotionAlgorithm- Parameters:
position- is the current position of the entity.linearSpeed- is the current linear speed of the entity.maxLinearSpeed- is the maximal linear speed or acceleration of the entity.target- is the point to reach.- Returns:
- the agent motion.
-
-