/**
  * Loads particle parameters from xml node.
  **/
 public void LoadXMLParticlePars(XmlNode particlePars)
 {
     position = LoadXMLParameter3D(particlePars.SelectSingleNode("position"));
     velocity = LoadXMLParameter3D(particlePars.SelectSingleNode("velocity"));
     /**
      * Speed and Direction: Not implemented yet.
      **/
     // speed = LoadXMLParameterDouble(particlePars.SelectSingleNode("speed"));
     // direction = LoadXMLParameterDouble(particlePars.SelectSingleNode("direction"));
     acceleration = LoadXMLParameter3D(particlePars.SelectSingleNode("acceleration"));
     color = LoadXMLParameter3D(particlePars.SelectSingleNode("color"));
     angle = LoadXMLParameterDouble(particlePars.SelectSingleNode("angle"));
     angularVelocity = LoadXMLParameterDouble(particlePars.SelectSingleNode("angularVelocity"));
     transparency = LoadXMLParameterDouble(particlePars.SelectSingleNode("transparency"));
     transparencyDelta = LoadXMLParameterDouble(particlePars.SelectSingleNode("transparencyDelta"));
     size = LoadXMLParameterDouble(particlePars.SelectSingleNode("size"));
     size.alpha *= GlobalScaling;
     size.beta *= GlobalScaling;
     growth = LoadXMLParameterDouble(particlePars.SelectSingleNode("growth"));
     ttl = LoadXMLParameterDouble(particlePars.SelectSingleNode("ttl"));
 }
        /**
         * Transposes a parameter using magnitude and direction to
         * one using a 3D vector.
         * TODO: Implement.
         **/
        public Parameter3D MagnitudeDirectionTo3DVector(
            ParameterDouble magnitude,
            ParameterDouble direction)
        {
            Parameter3D vector = new Parameter3D();

            /**
             * Randomly-distributed magnitude and direction variables
             * transformed to randomly-distributed 3d x,y,z vectors.
             **/

            return vector;
        }
        /**
         * Loads a Double parameter from the specified
         * XMLNode.
         **/
        public ParameterDouble LoadXMLParameterDouble(XmlNode node)
        {
            ParameterDouble newPar = new ParameterDouble();

            newPar.alpha = Convert.ToDouble(node.Attributes.GetNamedItem("alpha").Value);
            newPar.beta = Convert.ToDouble(node.Attributes.GetNamedItem("beta").Value);
            newPar.distribution = (Distribution)Enum.Parse(typeof(Distribution),
                Convert.ToString(node.Attributes.GetNamedItem("distribution").Value));

            return newPar;
        }