Esempio n. 1
0
        public static CT_LightRig Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_LightRig ctObj = new CT_LightRig();

            if (node.Attributes["rig"] != null)
            {
                ctObj.rig = (ST_LightRigType)Enum.Parse(typeof(ST_LightRigType), node.Attributes["rig"].Value);
            }
            if (node.Attributes["dir"] != null)
            {
                ctObj.dir = (ST_LightRigDirection)Enum.Parse(typeof(ST_LightRigDirection), node.Attributes["dir"].Value);
            }
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "rot")
                {
                    ctObj.rot = CT_SphereCoords.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Esempio n. 2
0
        public static CT_Camera Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Camera ctObj = new CT_Camera();

            if (node.Attributes["prst"] != null)
            {
                ctObj.prst = (ST_PresetCameraType)Enum.Parse(typeof(ST_PresetCameraType), node.Attributes["prst"].Value);
            }
            ctObj.fov  = XmlHelper.ReadInt(node.Attributes["fov"]);
            ctObj.zoom = XmlHelper.ReadInt(node.Attributes["zoom"]);
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "rot")
                {
                    ctObj.rot = CT_SphereCoords.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }