*   >> Lecture Éducation Articles >> science >> la programmation

Faire un jeu en 3D avec Ogre - Chargement d'un Scene

NextSiblingElement («entité»); } //

lumière de Processus (*) = pElement XMLNode-> FirstChildElement ("light"); while (pElement) {processLight (pElement, pNode); pElement = pElement-> NextSiblingElement ("light"); } //

caméra Processus (*) = pElement XMLNode-> FirstChildElement ("appareil photo"); while (pElement) {processCamera (pElement, pNode); pElement = pElement-> NextSiblingElement ("appareil photo"); } //

ParticleSystem de Processus (*) = pElement XMLNode-> FirstChildElement ("ParticleSystem"); while (pElement) {processParticleSystem (pElement, pNode); pElement = pElement-> NextSiblingElement ("ParticleSystem"); } //processus billboardSet

(*) = pElement XMLNode-> FirstChildElement ("billboardSet"); while (pElement) {processBillboardSet (pElement, pNode); pElement = pElement-> NextSiblingElement ("billboardSet"); } //

plan de Processus (*) = pElement XMLNode-> FirstChildElement ("plan"); while (pElement) {processPlane (pElement, pNode); pElement = pElement-> NextSiblingElement ("plan"); } //processus userDataReference

pElement = XMLNode-> FirstChildElement ("userDataReference") (?); si (pElement) processUserDataReference (pElement, pNode);}

annuler DotSceneLoader :: processLookTarget (TiXmlElement * XMLNode, SceneNode * pParent) {//! todo Est-ce exact? Parce que je ne ai pas la moindre idée fait

//Attributs de processus cordes nodeName = getAttrib (XMLNode, "nodeName");

Node :: TransformSpace relativeTo = Node :: TS_PARENT; Chaîne sValue = getAttrib (XMLNode, "relativeTo"); si (sValue == "locale") relativeTo = Node :: TS_LOCAL; else if (sValue == "parent") relativeTo = Node :: TS_PARENT; else if (sValue == "monde") relativeTo = Node :: TS_WORLD;

TiXmlElement * pElement;

//position de process Position Vector3 (?); pElement = XMLNode-> FirstChildElement ("position"); si la position (pElement) = parseVector3 (pElement);

//Processus localDirection Vector3 localDirection = Vector3 :: NEGATIVE_UNIT_Z (?); pElement = XMLNode-> FirstChildElement ("localDirection"); si (pElement) localDirection = parseVector3 (pElement); //

Setup la cible de regard try {if (nodeName.

empty ()!) {SceneNode * pLookNode = mSceneMgr-> getSceneNode (nodeName); Position = pLookNode -> _ getDerivedPosition (); }

pParent-> LookAt (position, relativeTo, localDirection); } Catch (Exception & Ogre :: /* e * /) {LogManager :: getSingleton () logMessage ("[DotSceneLoader] Erreur de traitement d'une

Page   <<  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... >>  >> 
Copyright © 2008 - 2016 Lecture Éducation Articles,https://lecture.nmjjxx.com All rights reserved.