Exemple #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();
        }
Exemple #2
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);
 }