Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ManualPath"/> class.
        /// </summary>
        /// <param name="replanCallback">The replan callback.</param>
        /// <param name="path">The path.</param>
        public ManualPath(Replan replanCallback, Path path)
        {
            Ensure.ArgumentNotNull(path, "path");

            this.onReplan = replanCallback;
            this.path = path;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ManualPath"/> class.
        /// </summary>
        /// <param name="replanCallback">The replan callback.</param>
        /// <param name="path">The path.</param>
        public ManualPath(Replan replanCallback, IIndexable<Vector3> path)
        {
            Ensure.ArgumentNotNull(path, "path");

            this.onReplan = replanCallback;

            var stack = new Path(path.count);
            for (int i = path.count - 1; i >= 0; i--)
            {
                stack.Push(path[i].AsPositioned());
            }

            this.path = stack;
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ManualPath"/> class.
        /// </summary>
        /// <param name="replanCallback">The replan callback.</param>
        /// <param name="path">The path.</param>
        public ManualPath(Replan replanCallback, params Vector3[] path)
        {
            Ensure.ArgumentNotNull(path, "path");

            this.onReplan = replanCallback;

            var stack = new Path(path.Length);
            for (int i = path.Length - 1; i >= 0; i--)
            {
                stack.Push(path[i].AsPositioned());
            }

            this.path = stack;
        }