public static GetXElement ( XYZ point, String name ) : System.Xml.Linq.XElement | ||
point | XYZ | The point. |
name | String | The name of the XML element. |
return | System.Xml.Linq.XElement |
/// <summary> /// Serializes the properties of the cell to an XML element. /// </summary> /// <param name="rootElement">The element to which the properties are added as subelements.</param> public void SerializeObjectData(XElement rootElement) { rootElement.Add(XmlUtils.GetXElement(m_lowerLeft, "LowerLeft")); rootElement.Add(XmlUtils.GetXElement(m_upperRight, "UpperRight")); rootElement.Add(XmlUtils.GetColorXElement(m_color, "Color")); rootElement.Add(XmlUtils.GetXElement(m_randomize, "Randomize")); }
/// <summary> /// Saves the contents of the point cloud into an XML element. /// </summary> /// <param name="rootElement">The XML element in which to save the point cloud properties.</param> public virtual void SerializeObjectData(XElement rootElement) { XElement scaleElement = XmlUtils.GetXElement(m_scale, "Scale"); rootElement.Add(scaleElement); int count = m_storedCells.Count; for (int i = 0; i < count; i++) { XElement cellElement = new XElement("Cell"); m_storedCells[i].SerializeObjectData(cellElement); rootElement.Add(cellElement); } }