public static HeightmapFile GetHeightmap(XmlDocument doc) { HeightmapFile hmf = new HeightmapFile(); hmf.ReadXml(doc.DocumentElement); return(hmf); }
public static string GetXml(HeightmapFile hmf) { StringBuilder sb = new StringBuilder(); sb.AppendLine(XmlHeader); if ((hmf != null) && (hmf.MaxHeights != null)) { var name = "Heightmap"; OpenTag(sb, 0, name); hmf.WriteXml(sb, 1); CloseTag(sb, 0, name); } return(sb.ToString()); }