Class AligningKinematicAlgorithm
- java.lang.Object
-
- org.arakhne.afc.agentmotion.kinematic.AligningKinematicAlgorithm
-
- All Implemented Interfaces:
Serializable,Cloneable,AligningMotionAlgorithm
public class AligningKinematicAlgorithm extends Object implements AligningMotionAlgorithm, Serializable, Cloneable
Agent is changing its oriented for being align to the target vector.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 doublestopAngleAngle to the target under which the agent could stop.
-
Constructor Summary
Constructors Constructor Description AligningKinematicAlgorithm(double stopAngle)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecalculate(Vector2D<?,?> orientation, double angularSpeed, double maxAngularSpeed, Vector2D<?,?> target)Calculate the rotation for being aligned to the target vector.AligningKinematicAlgorithmclone()Clone this algorithm.
-
-
-
Method Detail
-
clone
@Pure public AligningKinematicAlgorithm clone()
Description copied from interface:AligningMotionAlgorithmClone this algorithm.- Specified by:
clonein interfaceAligningMotionAlgorithm- Overrides:
clonein classObject- Returns:
- the clone.
-
calculate
public double calculate(Vector2D<?,?> orientation, double angularSpeed, double maxAngularSpeed, Vector2D<?,?> target)
Description copied from interface:AligningMotionAlgorithmCalculate the rotation for being aligned to the target vector.- Specified by:
calculatein interfaceAligningMotionAlgorithm- Parameters:
orientation- is the current orientation of the entity.angularSpeed- is the current angular speed of the entity.maxAngularSpeed- is the maximal angular speed or acceleration of the entity.target- is the vector to match.- Returns:
- the agent motion.
-
-