コード例 #1
0
        public static HeightmapFile GetHeightmap(XmlDocument doc)
        {
            HeightmapFile hmf = new HeightmapFile();

            hmf.ReadXml(doc.DocumentElement);
            return(hmf);
        }
コード例 #2
0
        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());
        }