void DotSceneLoader::processEnvironment(rapidxml::xml_node<>* XMLNode) { rapidxml::xml_node<>* pElement; // Process camera (?) pElement = XMLNode->first_node("camera"); if (pElement) processCamera(pElement); // Process fog (?) pElement = XMLNode->first_node("fog"); if (pElement) processFog(pElement); // Process skyBox (?) pElement = XMLNode->first_node("skyBox"); if (pElement) processSkyBox(pElement); // Process skyDome (?) pElement = XMLNode->first_node("skyDome"); if (pElement) processSkyDome(pElement); // Process skyPlane (?) pElement = XMLNode->first_node("skyPlane"); if (pElement) processSkyPlane(pElement); // Process clipping (?) pElement = XMLNode->first_node("clipping"); if (pElement) processClipping(pElement); // Process colourAmbient (?) pElement = XMLNode->first_node("colourAmbient"); if (pElement) mSceneMgr->setAmbientLight(parseColour(pElement)); // Process colourBackground (?) //! @todo Set the background colour of all viewports (RenderWindow has to be provided then) pElement = XMLNode->first_node("colourBackground"); if (pElement) ;//mSceneMgr->set(parseColour(pElement)); // Process userDataReference (?) pElement = XMLNode->first_node("userDataReference"); if (pElement) processUserDataReference(pElement); }
void DotSceneLoader::processEnvironment(rapidxml::xml_node<>* XMLNode) { rapidxml::xml_node<>* pElement; // Process camera (?) pElement = XMLNode->first_node("camera"); if (pElement) processCamera(pElement); // Process fog (?) pElement = XMLNode->first_node("fog"); if (pElement) processFog(pElement); // Process skyBox (?) pElement = XMLNode->first_node("skyBox"); if (pElement) processSkyBox(pElement); // Process skyDome (?) pElement = XMLNode->first_node("skyDome"); if (pElement) processSkyDome(pElement); // Process skyPlane (?) pElement = XMLNode->first_node("skyPlane"); if (pElement) processSkyPlane(pElement); // Process clipping (?) pElement = XMLNode->first_node("clipping"); // Process colourAmbient (?) pElement = XMLNode->first_node("colourAmbient"); if (pElement) mSceneMgr->setAmbientLight(parseColour(pElement)); // Process colourBackground (?) pElement = XMLNode->first_node("colourBackground"); /* if (pElement) ;// mSceneMgr->set(parseColour(pElement)); */ // Process userDataReference (?) pElement = XMLNode->first_node("userDataReference"); }
void DotSceneLoader::processEnvironment(TiXmlElement *xmlNode) { TiXmlElement *element; // Process fog (?) element = xmlNode->FirstChildElement("fog"); if(element) processFog(element); // Process skyBox (?) element = xmlNode->FirstChildElement("skyBox"); if(element) processSkyBox(element); // Process skyDome (?) element = xmlNode->FirstChildElement("skyDome"); if(element) processSkyDome(element); // Process skyPlane (?) element = xmlNode->FirstChildElement("skyPlane"); if(element) processSkyPlane(element); // Process clipping (?) element = xmlNode->FirstChildElement("clipping"); if(element) processClipping(element); // Process colourAmbient (?) element = xmlNode->FirstChildElement("colourAmbient"); // if(pElement) //TODO // mSceneMgr->setAmbientLight(parseColour(pElement)); // Process colourBackground (?) element = xmlNode->FirstChildElement("colourBackground"); if(element) ; //mSceneMgr->set(parseColour(pElement)); // Process userDataReference (?) element = xmlNode->FirstChildElement("userDataReference"); if(element) processUserDataReference(element); }
void ConfigFile::processOceanState(const xmlpp::Node* node){ xmlpp::Node::NodeList list = node->get_children(); for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ xmlpp::Node* child=dynamic_cast<const xmlpp::Node*>(*iter); //cout<<child->get_name()<<endl; if(child->get_name()=="windx") extractFloatChar(child,windx); else if(child->get_name()=="windy") extractFloatChar(child,windy); else if(child->get_name()=="windSpeed") extractFloatChar(child,windSpeed); else if(child->get_name()=="depth") extractFloatChar(child,depth); else if(child->get_name()=="reflectionDamping") extractFloatChar(child,reflectionDamping); else if(child->get_name()=="waveScale") extractFloatChar(child,waveScale); else if(child->get_name()=="isNotChoppy"){ extractIntChar(child,isNotChoppy); if(isNotChoppy != 0 && isNotChoppy!=1){ OSG_WARN << "ConfigFile::processOceanState: isNotChoppy is not a binary value ( 0 1), using default value (1)" << std::endl; isNotChoppy=1; } } else if(child->get_name()=="choppyFactor") extractFloatChar(child,choppyFactor); else if(child->get_name()=="crestFoamHeight") extractFloatChar(child,crestFoamHeight); else if(child->get_name()=="oceanSurfaceHeight") extractFloatChar(child,oceanSurfaceHeight); else if(child->get_name()=="fog") processFog(child); else if(child->get_name()=="color") extractPositionOrColor(child,color); else if(child->get_name()=="attenuation") extractPositionOrColor(child,attenuation); } }