anular DotSceneLoader :: processNode (TiXmlElement * XMLNode, SceneNode * pParent) {//Construir nome String nome do nó = m_sPrependNode + getAttrib (XMLNode, "nome");
//Cria o nó cena SceneNode * pNode; if (name.empty ()) {//Vamos Ogre escolher o nome if (pParent) pNode = pParent-> createChildSceneNode (); mais pNode = mAttachNode-> createChildSceneNode (); } Else {//Fornecer o nome, se (pParent) pNode = pParent-> createChildSceneNode (nome); mais pNode = mAttachNode-> createChildSceneNode (nome); } //
Processo de outros atributos id String = getAttrib (XMLNode, "id"); bool isTarget = getAttribBool (XMLNode, "isTarget");
TiXmlElement * pElement;
//posição Processo pElement = XMLNode-> FirstChildElement ("posição") (?); if (pElement) {pNode-> setPosition (parseVector3 (pElement)); pNode-> setInitialState (); } //
rotação Processo pElement = XMLNode-> FirstChildElement ("rotação") (?); if (pElement) {pNode-> setOrientation (parseQuaternion (pElement)); pNode-> setInitialState (); } //
escala Processo pElement = XMLNode-> FirstChildElement ("escala") (?); if (pElement) {pNode-> setScale (parseVector3 (pElement)); pNode-> setInitialState (); } //
lookTarget Processo pElement = XMLNode-> FirstChildElement ("lookTarget") (?); if (pElement) processLookTarget (pElement, pNode);
//Processo trackTarget pElement = XMLNode-> FirstChildElement ("trackTarget") (?); if (pElement) processTrackTarget (pElement, pNode);
//nó Processo (*) = pElement XMLNode-> FirstChildElement ("nó"); while (pElement) {processNode (pElement, pNode); pElement = pElement-> NextSiblingElement ("nó"); } //
entidade Processo (*) = pElement XMLNode-> FirstChildElement ("entidade"); while (pElement) {processEntity (pElement, pNode); pElement = pElement-> NextSiblingElement ("entidade"); } //
luz Processo (*) = pElement XMLNode-> FirstChildElement ("luz"); while (pElement) {processLight (pElement, pNode); pElement = pElement-> NextSiblingElement ("luz"); } //
câmera Processo (*) = pElement XMLNode-> FirstChildElement ("câmera"); while (pElement) {processCamera (pElement, pNode); pElement = pElement-> NextSiblingElement ("câmera"); } //
particleSystem Processo (*) = pElement XMLNode-> FirstChildElement ("particleSystem"); while (pElement) {processParticleSystem (pElement, pNode); pElement = pElement->