*   >> Lezen Onderwijs artikelen >> science >> programming

Het maken van een 3D-spel met Ogre - Laden van een Scene

ène processScene (XmlRoot);

//Sluit het XML-bestand te verwijderen XMLDoc;}

ongeldig DotSceneLoader :: processScene (TiXmlElement * XmlRoot) {//Process de scène parameters String versie = getAttrib (XmlRoot, "formatVersion", "onbekend");

String message = "[DotSceneLoader] parseren dotScene bestand met versie" + versie; if (XMLRoot-> Attribute ("ID")) bericht + = "id" + String (XMLRoot-> Attribute ("ID")); if (XMLRoot-> Attribute ("sceneManager")) bericht + = ", scene manager" + String (XMLRoot-> Attribute ("sceneManager")); if (XMLRoot-> Attribute ("minOgreVersion")) bericht + = ", min Ogre versie.

" + String (XMLRoot-> Attribute ("minOgreVersion")); if (XMLRoot-> Attribute ("author")) bericht + = ", auteur" + String (XMLRoot-> Attribute ("author"));

LogManager :: getSingleton () logMessage (bericht);.
TiXmlElement * pElement;

//Process nodes pElement = XMLRoot-> FirstChildElement ('nodes') (?); if (pElement) processNodes (pElement); (?)

//Proces externen pElement = XMLRoot-> FirstChildElement ("externen"); if (pElement) processExternals (pElement); (?)

//Proces milieu pElement = XMLRoot-> FirstChildElement ("milieu"); if (pElement) processEnvironment (pElement); (?)

//Proces terrein pElement = XMLRoot-> FirstChildElement ("terrein"); if (pElement) processTerrain (pElement);

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

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

//Process licht pElement = XMLRoot-> FirstChildElement ("light") (?); if (pElement) processLight (pElement); (?)

//Proces camera pElement = XMLRoot-> FirstChildElement ("camera"); if (pElement) processCamera (pElement);}

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

//Proces knooppunt (*) pElement = XMLNode-> FirstChildElement ("knooppunt"); while (pElement) {processNode (pElement); pElement = pElement-> NextSiblingElement ("knooppunt"); } //

Proces positie pElement = XMLNode-> FirstChildElement ("stand") (?); if (pElement) {mAttachNode-> SetPosition (parseVector3 (pElement)); mAttachNode-> setInitialState (); } //

Proces rotatie pElement = XMLNode-> FirstChildElement ("rotatie") (?); if (pElement) {mAttachNode-> setOrientation (parseQuaternion (pElement)); mAttachNode-> setInitialState (); } //

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

Page   <<  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... >>  >> 
Copyright © 2008 - 2016 Lezen Onderwijs artikelen,https://onderwijs.nmjjxx.com All rights reserved.