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 double
stopAngle
Angle 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 double
calculate(Vector2D<?,?> orientation, double angularSpeed, double maxAngularSpeed, Vector2D<?,?> target)
Calculate the rotation for being aligned to the target vector.AligningKinematicAlgorithm
clone()
Clone this algorithm.
-
-
-
Method Detail
-
clone
@Pure public AligningKinematicAlgorithm clone()
Description copied from interface:AligningMotionAlgorithm
Clone this algorithm.- Specified by:
clone
in interfaceAligningMotionAlgorithm
- Overrides:
clone
in classObject
- Returns:
- the clone.
-
calculate
public double calculate(Vector2D<?,?> orientation, double angularSpeed, double maxAngularSpeed, Vector2D<?,?> target)
Description copied from interface:AligningMotionAlgorithm
Calculate the rotation for being aligned to the target vector.- Specified by:
calculate
in 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.
-
-