*   >> Lectura Educación Artículos >> science >> programación

Hacer un juego en 3D con Ogre - Carga de un Scene

n (pElement));

pElement = XMLNode-> FirstChildElement ("lookAt"); si (pElement) pCamera-> lookAt (parseVector3 (pElement)); //

proceso normal pElement = XMLNode-> FirstChildElement ("normal") (?); si (pElement); //! //LookTarget Proceso pElement = XMLNode-> FirstChildElement ("lookTarget") (?); si (pElement); //! //TrackTarget Proceso pElement = XMLNode-> FirstChildElement ("trackTarget") (?); si (pElement); //! //UserDataReference Proceso pElement = XMLNode-> FirstChildElement ("userDataReference") (?); si (pElement);! //}

anularán DotSceneLoader :: processNode (TiXmlElement * XMLNode, SceneNode * pParent) {//Construir nombre String nombre del nodo = m_sPrependNode + getAttrib (XMLNode, "nombre");

//Crear el nodo escena SceneNode * pNode; si (name.

empty ()) {//Que Ogre elegir el nombre si (pParent) pNode = pParent-> createChildSceneNode (); otra cosa pNode = mAttachNode-> createChildSceneNode (); } Else {//Proporcionar el nombre si (pParent) pNode = pParent-> createChildSceneNode (nombre); otra cosa pNode = mAttachNode-> createChildSceneNode (nombre); }

//Proceso de otros atributos de id String = getAttrib (XMLNode, "id"); bool isTarget = getAttribBool (XMLNode, "isTarget");

TiXmlElement * pElement;

//posición Proceso pElement = XMLNode-> FirstChildElement ("posición") (?); si (pElement) {pNode-> setPosition (parseVector3 (pElement)); pNode-> setInitialState (); } //

rotación Proceso pElement = XMLNode-> FirstChildElement ("rotación") (?); si (pElement) {pNode-> setOrientation (parseQuaternion (pElement)); pNode-> setInitialState (); } //

escala Proceso pElement = XMLNode-> FirstChildElement ("escala") (?); si (pElement) {pNode-> setScale (parseVector3 (pElement)); pNode-> setInitialState (); } //

lookTarget Proceso pElement = XMLNode-> FirstChildElement ("lookTarget") (?); si (pElement) processLookTarget (pElement, pNode);

//trackTarget Proceso pElement = XMLNode-> FirstChildElement ("trackTarget") (?); si (pElement) processTrackTarget (pElement, pNode);

//nodo Proceso (*) pElement = XMLNode-> FirstChildElement ("nodo"); while (pElement) {processNode (pElement, pNode); pElement = pElement-> NextSiblingElement ("nodo"); } //

entidad Proceso (*) pElement = XMLNode-> FirstChildElement ("entidad"); while (pElement) {processEntity (pElement, pNode); pElement = pElement-> NextSiblingElement ("entidad"); } //

luz Proceso (*) pElement = XMLNode-> FirstChildElement ("luz"); while (pElement) {processLight (pElement, pNode); pElement = pElement->

Page   <<  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... >>  >> 
Copyright © 2008 - 2016 Lectura Educación Artículos,https://lectura.nmjjxx.com All rights reserved.