//============================================================ // <T>加载模型设置。</T> // // @param xconfig 设置信息 //============================================================ public void LoadModelConfig(FXmlNode xconfig) { _dataName = xconfig.Get("name"); // 读取环境光 FXmlNode ambientNode = xconfig.Find("Ambient"); if (null != ambientNode) { _ambient.LoadConfig3(ambientNode); } // 读取散射光 FXmlNode diffuseNode = xconfig.Find("Diffuse"); if (null != diffuseNode) { _diffuse.LoadConfig3(diffuseNode); } // 读取全反射 FXmlNode specularNode = xconfig.Find("Specular"); if (null != specularNode) { _specular.LoadConfig3(specularNode); } // 读取全反射级别 FXmlNode specularLevelNode = xconfig.Find("SpecularLevel"); if (null != specularLevelNode) { _specular.A = specularLevelNode.GetFloat("value"); } // 读取自发光 FXmlNode emissiveNode = xconfig.Find("Emissive"); if (null != emissiveNode) { _emissive.LoadConfig3(emissiveNode); } FXmlNode emissiveAmtNode = xconfig.Find("EmissiveAmt"); if (null != emissiveAmtNode) { _emissive.A = emissiveAmtNode.GetFloat("value"); } }