annullere DotSceneLoader :: processNode (TiXmlElement * XMLNode, SceneNode * pParent) {//Konstruer noden navn String name = m_sPrependNode + getAttrib (XMLNode, "navn"); Anmeldelser //Opprett scenen node SceneNode * pNode; if (name.
empty ()) {//La Ogre velge navnet if (pParent) pNode = pParent-> createChildSceneNode (); annet pNode = mAttachNode-> createChildSceneNode (); } Else {//Oppgi navn if (pParent) pNode = pParent-> createChildSceneNode (navn); annet pNode = mAttachNode-> createChildSceneNode (navn); }
//Process andre attributter String id = getAttrib (XMLNode, "id"); bool isTarget = getAttribBool (XMLNode, "isTarget");
TiXmlElement * pElement;
//Process posisjon pElement = XMLNode-> FirstChildElement ("posisjon") (?); if (pElement) {pNode-> setPosition (parseVector3 (pElement)); pNode-> setInitialState (); }
//Process rotasjon pElement = XMLNode-> FirstChildElement ("rotasjon") (?); if (pElement) {pNode-> setOrientation (parseQuaternion (pElement)); pNode-> setInitialState (); }
//Process skala pElement = XMLNode-> FirstChildElement ("scale") (?); if (pElement) {pNode-> setScale (parseVector3 (pElement)); pNode-> setInitialState (); }
//Process lookTarget pElement = XMLNode-> FirstChildElement ("lookTarget") (?); if (pElement) processLookTarget (pElement, pNode);
//Process trackTarget pElement = XMLNode-> FirstChildElement ("trackTarget") (?); if (pElement) processTrackTarget (pElement, pNode);
//Process node (*) pElement = XMLNode-> FirstChildElement ("node"); while (pElement) {processNode (pElement, pNode); pElement = pElement-> NextSiblingElement ("node"); }
//Process enhet (*) pElement = XMLNode-> FirstChildElement ("enhet"); while (pElement) {processEntity (pElement, pNode); pElement = pElement-> NextSiblingElement ("enhet"); }
//Process lys (*) pElement = XMLNode-> FirstChildElement ("lys"); while (pElement) {processLight (pElement, pNode); pElement = pElement-> NextSiblingElement ("lys"); }
//Process kamera (*) pElement = XMLNode-> FirstChildElement ("kamera"); while (pElement) {processCamera (pElement, pNode); pElement = pElement-> NextSiblingElement ("kamera"); }
//Process particleSystem (*) pElement = XMLNode-> FirstChildElement ("particleSystem"); while (pElement) {processParticleSystem (pElement, pNode); pElement = pElement-> NextSiblingElement ("particleSystem"); }
//Process billboardSet (*) pElement = XMLNode-> FirstChildElement ("billboardSet"); while (pElement) {processBillboardSet (pElement, pNode); pElement = pElement->