Class SeekingAlgorithm

    • Constructor Detail

      • SeekingAlgorithm

        public SeekingAlgorithm()
    • Method Detail

      • calculate

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