Class ArrivingKinematicAlgorithm

    • Field Detail

      • stopSquaredDistance

        protected final double stopSquaredDistance
        Square distance to the target under which the agent could stop.
    • Constructor Detail

      • ArrivingKinematicAlgorithm

        public ArrivingKinematicAlgorithm​(double stopDistance)
        Constructor.
        Parameters:
        stopDistance - the distance to the target under which the agent could stop.
    • Method Detail

      • calculate

        public Vector2D<?,​?> calculate​(Point2D<?,​?> position,
                                             double linearSpeed,
                                             double maxLinearSpeed,
                                             Point2D<?,​?> target)
        Description copied from interface: ArrivingMotionAlgorithm
        Calculate the linear motion for arriving the target point.
        Specified by:
        calculate in interface ArrivingMotionAlgorithm
        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.