*   >> Læs Uddannelse artikler >> science >> programming

Realiseringen af ​​et 3D-spil med Ogre - Indlæsning af en Scene

XMLRoot) {//Proces scenen parametre String-version = getAttrib (XMLRoot "formatVersion", "ukendt")

String besked = "[DotSceneLoader] Tolker dotScene fil med version" + udgave; hvis (XMLRoot-> Attribut ("ID")) besked + = ", id" + String (XMLRoot-> Attribut ("ID")); hvis (XMLRoot-> Attribut ("sceneManager")) besked + = ", scene manager" + String (XMLRoot-> Attribut ("sceneManager")); hvis (XMLRoot-> Attribut ("minOgreVersion")) besked + = ", min Ogre-version.

" + String (XMLRoot-> Attribut ("minOgreVersion")); hvis (XMLRoot-> Attribut ("forfatter")) besked + = ", forfatter" + String (XMLRoot-> Attribut ("forfatter")),

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

//Proces noder pElement = XMLRoot-> FirstChildElement ("noder") (?); Hvis (pElement) processNodes (pElement), (?)

//Proces eksterne pElement = XMLRoot-> FirstChildElement ("eksterne"); Hvis (pElement) processExternals (pElement) (?)

//Proces miljø pElement = XMLRoot-> FirstChildElement ("miljø"); hvis (pElement) processEnvironment (pElement) (?)

//Proces terræn pElement = XMLRoot-> FirstChildElement ("terræn"); hvis (pElement) processTerrain (pElement)

//Proces userDataReference pElement = XMLRoot-> FirstChildElement ("userDataReference") (?); hvis (pElement) processUserDataReference (pElement) (?)

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

//Proces lys pElement = XMLRoot-> FirstChildElement ("light") (?); hvis (pElement) processLight (pElement) (?)

//Proces kamera pElement = XMLRoot-> FirstChildElement ("kamera"); hvis (pElement) processCamera (pElement)}

ugyldiggøre DotSceneLoader :: processNodes (TiXmlElement * XMLNode) {TiXmlElement * pElement;

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

//Proces position pElement = XMLNode-> FirstChildElement ("position") (?); hvis (pElement) {mAttachNode-> setPosition (parseVector3 (pElement)); mAttachNode-> setInitialState (); }

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

//Proces skala pElement = XMLNode-> FirstChildElement ("skalaen") (?); hvis (pElement) {mAttachNode-> setScale (parseVector3 (pElement)); mAttachNode-> setInit

Page   <<  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... >>  >> 
Copyright © 2008 - 2016 Læs Uddannelse artikler,https://uddannelse.nmjjxx.com All rights reserved.