AoMEngineLibrary.Graphics.Grn.Nodes.GrnMeshVerticesNode.CreateFolderFile C# (CSharp) Method

CreateFolderFile() public method

public CreateFolderFile ( string folder ) : void
folder string
return void
        public override void CreateFolderFile(string folder)
        {
            XDocument doc = new XDocument();
            XElement root = new XElement("meshVertices", new XAttribute("count", this.Vertices.Count));
            doc.Add(root);
            for (int i = 0; i < this.Vertices.Count; ++i)
            {
                root.Add(new XElement("vertex", new XAttribute("index", i), this.Vertices[i]));
            }

            string fileName = System.IO.Path.Combine(folder, "meshVertices.xml");
            using (FileStream stream = System.IO.File.Create(fileName))
            {
                doc.Save(stream);
            }
        }