Class FleeingAlgorithm

    • Constructor Detail

      • FleeingAlgorithm

        public FleeingAlgorithm()
    • Method Detail

      • calculate

        public Vector2D<?,​?> calculate​(Point2D<?,​?> position,
                                             double linearSpeed,
                                             double maxLinear,
                                             Point2D<?,​?> target)
        Description copied from interface: FleeingMotionAlgorithm
        Calculate the linear motion for fleeing the target position.
        Specified by:
        calculate in interface FleeingMotionAlgorithm
        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 flee.
        Returns:
        the agent motion.