Class SeekingAlgorithm
- java.lang.Object
-
- org.arakhne.afc.agentmotion.common.SeekingAlgorithm
-
- All Implemented Interfaces:
Serializable,Cloneable,SeekingMotionAlgorithm
public class SeekingAlgorithm extends Object implements SeekingMotionAlgorithm, Serializable, Cloneable
Agent is changing its position for seeking the target point.This algorithm uses speeds or acceleration, depending of the value of
maxLinear.- 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
-
-
Constructor Summary
Constructors Constructor Description SeekingAlgorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector2D<?,?>calculate(Point2D<?,?> position, double linearSpeed, double maxLinear, Point2D<?,?> target)Calculate the linear motion for seeking the target point.SeekingAlgorithmclone()Clone this algorithm.
-
-
-
Method Detail
-
clone
@Pure public SeekingAlgorithm clone()
Description copied from interface:SeekingMotionAlgorithmClone this algorithm.- Specified by:
clonein interfaceSeekingMotionAlgorithm- Overrides:
clonein classObject- Returns:
- the clone.
-
calculate
@Pure public Vector2D<?,?> calculate(Point2D<?,?> position, double linearSpeed, double maxLinear, Point2D<?,?> target)
Description copied from interface:SeekingMotionAlgorithmCalculate the linear motion for seeking the target point.- Specified by:
calculatein interfaceSeekingMotionAlgorithm- 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.target- is the point to reach.- Returns:
- the agent motion.
-
-