Ejemplo n.º 1
0
        public static void Main()
        {
            Point3D point = new Point3D(3, 5, 6);

            Point3D secondpoint = new Point3D(1, 2, 3);

            Console.WriteLine("Distance: " + Calculate3DDistance.CalculateDistance(point, secondpoint));

            PathStorage.LoadPath();

            Path path = new Path();

            path.AddPoint(point);
            path.AddPoint(secondpoint);

            PathStorage.SavePath(path);
        }
        public static void LoadPath()
        {
            StreamReader reader = new StreamReader(@".../.../text/Input.txt");

            Path path = new Path();

            string line = reader.ReadLine();
            path.AddPoint(new Point3D(line));

            while (line != null)
            {
                line = reader.ReadLine();
                if (line == null)
                {
                    break;
                }
                path.AddPoint(new Point3D(line));
            }
            reader.Close();

            path.PrintPath(path);
        }