예제 #1
0
        /// <summary>
        /// Draws coordinates from a provider by a constant speed
        /// </summary>
        /// <param name="provider">Provider which creates coordinates.</param>
        /// <param name="speed">Speed of drawing</param>
        public static PlanBuilder DrawByConstantSpeed(CoordinateProvider provider, Speed speed = null)
        {
            if (speed == null)
            {
                speed = Constants.ReverseSafeSpeed;
            }

            var points     = provider();
            var trajectory = new Trajectory4D(points);

            var planner = new StraightLinePlanner(speed);

            return(planner.CreateConstantPlan(trajectory));
        }
예제 #2
0
        /// <summary>
        /// Draws coordinates from a provider by a continuous speed
        /// </summary>
        /// <param name="provider">Provider which creates coordinates.</param>
        /// <param name="speed">Speed of drawing</param>
        public static PlanBuilder DrawContinuousLines(CoordinateProvider provider, Speed speed = null)
        {
            if (speed == null)
            {
                speed = Constants.MaxPlaneSpeed;
            }

            var points     = provider();
            var trajectory = new Trajectory4D(points);

            var planner = new StraightLinePlanner(speed);

            return(planner.CreateContinuousPlan(trajectory));
        }
예제 #3
0
        /// <summary>
        /// Draws coordinates from a provider by a constant speed
        /// </summary>
        /// <param name="provider">Provider which creates coordinates.</param>
        /// <param name="speed">Speed of drawing</param>
        public static PlanBuilder DrawByRampedLines(CoordinateProvider provider, Speed speed = null)
        {
            if (speed == null)
            {
                speed = Configuration.MaxPlaneSpeed;
            }

            var points     = provider();
            var trajectory = new Trajectory4D(points);

            var planner = new StraightLinePlanner(speed);

            return(planner.CreateRampedPlan(trajectory));
        }