*   >> Leitura Educação Artigos >> science >> programação

Fazendo um jogo 3D com Ogre - Carregando um Scene

cessScene (TiXmlElement * XmlRoot) {//Processar a cena Parâmetros string version = getAttrib (XmlRoot, "formatVersion", "desconhecido");

mensagem String = "[DotSceneLoader] Analisando o arquivo dotScene com a versão" + versão; if (XMLRoot-> Atributo () "ID") + message = "id" + String (XMLRoot-> Atributo ("ID")); if (XMLRoot-> Atributo () "SceneManager") mensagem + = ", gerente de cena" + String (XMLRoot-> Atributo ("SceneManager")); if (XMLRoot-> Atributo ("minOgreVersion")) + message = ", min versão Ogre.

" + String (XMLRoot-> Atributo ("minOgreVersion")); if (XMLRoot-> Atributo () "autor") mensagem + = ", autor" + String (XMLRoot-> Atributo ("autor"));

LogManager :: getSingleton () logMessage (mensagem);.
TiXmlElement * pElement; nós

//Processo pElement = XMLRoot-> FirstChildElement ("nós") (?); if (pElement) processNodes (pElement); (?) externals

//Processo pElement = XMLRoot-> FirstChildElement ("externals"); if (pElement) processExternals (pElement); (?)

//ambiente de Processo pElement = XMLRoot-> FirstChildElement ("ambiente"); if (pElement) processEnvironment (pElement); (?)

//Processo terreno pElement = XMLRoot-> FirstChildElement ("terreno"); if (pElement) processTerrain (pElement);

//Processo userDataReference pElement = XMLRoot-> FirstChildElement ("userDataReference") (?); if (pElement) processUserDataReference (pElement); (?)

//Processo octree pElement = XMLRoot-> FirstChildElement ("octree"); if (pElement) processOctree (pElement);

//luz Processo pElement = XMLRoot-> FirstChildElement ("luz") (?); if (pElement) processLight (pElement); (?)

//câmera Processo pElement = XMLRoot-> FirstChildElement ("câmera"); if (pElement) processCamera (pElement);}

anular DotSceneLoader :: processNodes (TiXmlElement * XMLNode) {TiXmlElement * pElement;

//nó Processo (*) = XMLNode- pElement> FirstChildElement ("nó"); while (pElement) {processNode (pElement); pElement = pElement-> NextSiblingElement ("nó"); } //

posição Processo pElement = XMLNode-> FirstChildElement ("posição") (?); if (pElement) {mAttachNode-> setPosition (parseVector3 (pElement)); mAttachNode-> setInitialState (); } //

rotação Processo pElement = XMLNode-> FirstChildElement ("rotação") (?); if (pElement) {mAttachNode-> setOrientation (parseQuaternion (pElement)); mAttachNode-> setInitialState (); } //

escala Processo pElement = XMLNode-> FirstChildElement ("escala") (?); if (pElement) {mAttachNode-> setScale (parseVector3 (pElement)); mAttachNode->

Page   <<  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... >>  >> 
Copyright © 2008 - 2016 Leitura Educação Artigos,https://artigos.nmjjxx.com All rights reserved.