Beispiel #1
0
        public void LoadXML(XmlReader reader)
        {
            XMLHelpers.ReadFloat(reader, "specularPower", ref _SpecularPower);
            XMLHelpers.ReadFloat(reader, "opacity", ref _Opacity);
            XMLHelpers.ReadFloat(reader, "density", ref _Density);
            XMLHelpers.ReadFloat(reader, "tintdensity", ref _TintDensity);
            XMLHelpers.ReadFloat(reader, "shininess", ref _Shininess);
            XMLHelpers.ReadFloat(reader, "refractiveIndex", ref _RefractiveIndex);

            while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "DIFFUSECOLOUR")
                {
                    XMLHelpers.ReadColour(reader, ref _DiffuseColour);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "SPECULARCOLOUR")
                {
                    XMLHelpers.ReadColour(reader, ref _SpecularColour);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "EMISSIVECOLOUR")
                {
                    XMLHelpers.ReadColour(reader, ref _EmissiveColour);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "REFLECTIVITYCOLOUR")
                {
                    XMLHelpers.ReadColour(reader, ref _Reflectivity);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "ABSORPTIONCOLOUR")
                {
                    XMLHelpers.ReadColour(reader, ref _AbsorptionColour);
                }
            }
            reader.Read();
        }
Beispiel #2
0
        public void LoadXML(XmlReader reader)
        {
            _GradientSegments.Clear();
            XMLHelpers.ReadOrbitType(reader, "orbitType", ref _OrbitType);
            XMLHelpers.ReadBlendType(reader, "blendType", ref _BlendType);
            XMLHelpers.ReadDouble(reader, "multiplier", ref _Multiplier);
            XMLHelpers.ReadDouble(reader, "offset", ref _Offset);
            XMLHelpers.ReadDouble(reader, "power", ref _Power);

            while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "GRADIENTSEGMENT")
                {
                    GradientSegment seg = new GradientSegment();
                    seg.LoadXML(reader);
                    _GradientSegments.Add(seg);
                }
            }

            // backwards compatability
            if (_GradientSegments.Count() == 0)
            {
                _GradientSegments.Add(new GradientSegment());
            }

            reader.Read();
        }
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadVector3(reader, "rotation", ref _Rotation);
     XMLHelpers.ReadDouble(reader, "scale", ref _Scale);
     XMLHelpers.ReadInt(reader, "repeats", ref _Repeats);
     reader.Read();
 }
Beispiel #4
0
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadDouble(reader, "scale", ref _Scale);
     XMLHelpers.ReadVector3(reader, "csize", ref _CSize);
     XMLHelpers.ReadVector3(reader, "julia", ref _Julia);
     XMLHelpers.ReadInt(reader, "repeats", ref _Repeats);
     reader.Read();
 }
Beispiel #5
0
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadVector3(reader, "preRotation", ref _PreRotation);
     XMLHelpers.ReadVector3(reader, "postRotation", ref _PostRotation);
     XMLHelpers.ReadDouble(reader, "scale", ref _Scale);
     XMLHelpers.ReadVector3(reader, "offset", ref _Offset);
     XMLHelpers.ReadFractalType(reader, "fractalType", ref _FractalType);
     XMLHelpers.ReadInt(reader, "repeats", ref _Repeats);
     reader.Read();
 }
Beispiel #6
0
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadVector3(reader, "from", ref _Position);
     XMLHelpers.ReadVector3(reader, "target", ref _Target);
     XMLHelpers.ReadDouble(reader, "fov", ref _FOV);
     XMLHelpers.ReadDouble(reader, "apertureSize", ref _ApertureSize);
     XMLHelpers.ReadDouble(reader, "spherical", ref _Spherical);
     XMLHelpers.ReadDouble(reader, "stereographic", ref _Stereographic);
     XMLHelpers.ReadDouble(reader, "focusDepth", ref _FocusDepth);
     XMLHelpers.ReadDouble(reader, "exposure", ref _Exposure);
     reader.Read();
 }
Beispiel #7
0
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadDouble(reader, "distanceMinimum", ref _DistanceMinimum);
     XMLHelpers.ReadDouble(reader, "distanceIterations", ref _DistanceIterations);
     XMLHelpers.ReadDouble(reader, "stepSize", ref _StepSize);
     XMLHelpers.ReadDouble(reader, "distanceExtents", ref _DistanceExtents);
     XMLHelpers.ReadInt(reader, "fractalIterationCount", ref _FractalIterationCount);
     XMLHelpers.ReadInt(reader, "colourIterationCount", ref _ColourIterationCount);
     XMLHelpers.ReadInt(reader, "deMode", ref _DEMode);
     XMLHelpers.ReadInt(reader, "background", ref _Background);
     XMLHelpers.ReadInt(reader, "lighting", ref _Lighting);
 }
Beispiel #8
0
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadBool(reader, "autoExposure", ref _AutoExposure);
     XMLHelpers.ReadBool(reader, "shadowsEnabled", ref _ShadowsEnabled);
     XMLHelpers.ReadBool(reader, "dofEnabled", ref _DoFEnabled);
     XMLHelpers.ReadInt(reader, "reflections", ref _Reflections);
     XMLHelpers.ReadBool(reader, "headlight", ref _Headlight);
     XMLHelpers.ReadBool(reader, "colours", ref _Colours);
     XMLHelpers.ReadBool(reader, "progressive", ref _Progressive);
     XMLHelpers.ReadInt(reader, "maxIterations", ref _MaxIterations);
     XMLHelpers.ReadInt(reader, "resolution", ref _Resolution);
     reader.Read();
 }
Beispiel #9
0
        public void LoadXML(XmlReader reader)
        {
            XMLHelpers.ReadFloat(reader, "startX", ref _StartX);
            XMLHelpers.ReadFloat(reader, "endX", ref _EndX);

            while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "STARTCOLOUR")
                {
                    _StartColour.LoadXML(reader);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "ENDCOLOUR")
                {
                    _EndColour.LoadXML(reader);
                }
            }
            reader.Read();
        }
Beispiel #10
0
        public void LoadXML(XmlReader reader)
        {
            XMLHelpers.ReadBlendType(reader, "blendType", ref _BlendType);
            XMLHelpers.ReadDouble(reader, "multiplier", ref _Multiplier);
            XMLHelpers.ReadDouble(reader, "offset", ref _Offset);
            XMLHelpers.ReadDouble(reader, "power", ref _Power);

            while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "STARTCOLOUR")
                {
                    _StartColour.LoadXML(reader);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "ENDCOLOUR")
                {
                    _EndColour.LoadXML(reader);
                }
            }
            reader.Read();
        }
Beispiel #11
0
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadDouble(reader, "distanceMinimum", ref _DistanceMinimum);
     XMLHelpers.ReadInt(reader, "distanceMinimumMode", ref _DistanceMinimumMode);
     XMLHelpers.ReadDouble(reader, "distanceIterations", ref _DistanceIterations);
     XMLHelpers.ReadDouble(reader, "stepSize", ref _StepSize);
     XMLHelpers.ReadDouble(reader, "distanceExtents", ref _DistanceExtents);
     XMLHelpers.ReadInt(reader, "fractalIterationCount", ref _FractalIterationCount);
     XMLHelpers.ReadInt(reader, "colourIterationCount", ref _ColourIterationCount);
     XMLHelpers.ReadInt(reader, "deMode", ref _DEMode);
     XMLHelpers.ReadInt(reader, "background", ref _Background);
     XMLHelpers.ReadInt(reader, "lighting", ref _Lighting);
     XMLHelpers.ReadDouble(reader, "sunHeight", ref _SunHeight);
     XMLHelpers.ReadDouble(reader, "sunDirection", ref _SunDirection);
     XMLHelpers.ReadBool(reader, "headlightEnabled", ref _Headlight);
     XMLHelpers.ReadDouble(reader, "headlightStrength", ref _HeadLightStrength);
     XMLHelpers.ReadDouble(reader, "fogStrength", ref _FogStrength);
     XMLHelpers.ReadColour(reader, "fogColour", ref _FogColour);
     XMLHelpers.ReadInt(reader, "fogSamples", ref _FogSamples);
     XMLHelpers.ReadFogType(reader, "fogType", ref _FogType);
 }
Beispiel #12
0
        public void LoadXML(XmlReader reader)
        {
            XMLHelpers.ReadBool(reader, "xOrbitEnabled", ref _XOrbitEnabled);
            XMLHelpers.ReadBool(reader, "yOrbitEnabled", ref _YOrbitEnabled);
            XMLHelpers.ReadBool(reader, "zOrbitEnabled", ref _ZOrbitEnabled);

            while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "ORBITCOLOURSX")
                {
                    _OrbitColoursX.LoadXML(reader);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "ORBITCOLOURSY")
                {
                    _OrbitColoursY.LoadXML(reader);
                }
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "ORBITCOLOURSZ")
                {
                    _OrbitColoursZ.LoadXML(reader);
                }
            }
            reader.Read();
        }
Beispiel #13
0
 public void LoadXML(XmlReader reader)
 {
     XMLHelpers.ReadVector3(reader, "foldRadius", ref _FoldRadius);
     XMLHelpers.ReadInt(reader, "repeats", ref _Repeats);
     reader.Read();
 }