Class AligningKinematicAlgorithm

    • Field Detail

      • stopAngle

        protected final double stopAngle
        Angle to the target under which the agent could stop.
    • Constructor Detail

      • AligningKinematicAlgorithm

        public AligningKinematicAlgorithm​(double stopAngle)
        Constructor.
        Parameters:
        stopAngle - the angle to the target under which the agent could stop.
    • Method Detail

      • 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 interface AligningMotionAlgorithm
        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.