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

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

FirstChildElement ("userDataReference") (?); if (pElement); //}

ongeldig DotSceneLoader :: processNode (TiXmlElement * XMLNode, SceneNode * pParent) {//Construct naam String de naam van het knooppunt = m_sPrependNode + getAttrib (XMLNode, "naam"); ​​

//Maak de scène knooppunt SceneNode * PNODE; if (name.

empty ()) {//Laat Ogre kiezen voor de naam als (pParent) PNODE = pParent-> createChildSceneNode (); anders PNODE = mAttachNode-> createChildSceneNode (); } Else {//Geef de naam als (pParent) PNODE = pParent-> createChildSceneNode (naam); anders PNODE = mAttachNode-> createChildSceneNode (naam); } //

Proces andere attributen String id = getAttrib (XMLNode, "id"); Bool isTarget = getAttribBool (XMLNode, "isTarget");

TiXmlElement * pElement;

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

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

Proces schaal pElement = XMLNode-> FirstChildElement ("schaal") (?); if (pElement) {pNode-> setScale (parseVector3 (pElement)); pNode-> setInitialState (); } //

Proces lookTarget pElement = XMLNode-> FirstChildElement ("lookTarget") (?); if (pElement) processLookTarget (pElement, PNODE);

//Process trackTarget pElement = XMLNode-> FirstChildElement ("trackTarget") (?); if (pElement) processTrackTarget (pElement, PNODE);

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

Process entiteit (*) pElement = XMLNode-> FirstChildElement ("entiteiten"); while (pElement) {processEntity (pElement, PNODE); pElement = pElement-> NextSiblingElement ("entiteiten"); } //

Process licht (*) pElement = XMLNode-> FirstChildElement ("light"); while (pElement) {processLight (pElement, PNODE); pElement = pElement-> NextSiblingElement ("light"); } //

Process camera (*) pElement = XMLNode-> FirstChildElement ("camera"); while (pElement) {processCamera (pElement, PNODE); pElement = pElement->

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