Ejemplo n.º 1
0
        public static List<Path> LoadPath()
        {
            Path pathToLoad = new Path();
            List<Path> pathsList = new List<Path>();

            using (StreamReader reader = new StreamReader(@"..\..\LoadPaths.txt"))
            {
                string newLine = reader.ReadLine();                

                while (newLine != string.Empty)
                {
                    Point3D newPoint = new Point3D();
                    newLine = reader.ReadLine();
                    
                    newPoint.X = int.Parse(newLine);
                    newLine = reader.ReadLine();
                    newPoint.Y = int.Parse(newLine);
                    newLine = reader.ReadLine();
                    newPoint.Z = int.Parse(newLine);

                    pathToLoad.AddPoint(newPoint);
                    newLine = reader.ReadLine();
                    
                    pathsList.Add(pathToLoad);
                    pathToLoad = new Path();
                    
                    
                }
            }

            return pathsList;
        }
Ejemplo n.º 2
0
 //Methods
 public void AddPoint(Point3D point)
 {            
      pointList.Add(point);
    
 }