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

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

setDirection (parseVector3 (pElement)); (?)

//Proceso colourDiffuse pElement = XMLNode-> FirstChildElement ("colourDiffuse"); si (pElement) pLight-> setDiffuseColour (parseColour (pElement)); (?)

//Proceso colourSpecular pElement = XMLNode-> FirstChildElement ("colourSpecular"); si (pElement) pLight-> setSpecularColour (parseColour (pElement)); (?)

//Proceso lightRange pElement = XMLNode-> FirstChildElement ("lightRange"); si (pElement) processLightRange (pElement, sufrimiento);

//lightAttenuation Proceso pElement = XMLNode-> FirstChildElement ("lightAttenuation") (?); si (pElement) processLightAttenuation (pElement, sufrimiento);

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

anular DotSceneLoader :: processCamera (TiXmlElement * XMLNode, SceneNode * pParent) {//Proceso atributos String name = getAttrib (XMLNode, "nombre"); String id = getAttrib (XMLNode, "id"); FOV real = getAttribReal (XMLNode, "FOV", 45); Bienes aspectRatio = getAttribReal (XMLNode, "aspectRatio", 1.

3333); Cadena projectionType = getAttrib (XMLNode, "projectionType", "perspectiva"); //

Encontrar una cámara cmaera existente * pCamera = mSceneMgr-> getCamera (nombre); si (pCamera == NULL) {//Crear la cámara Cámara * pCamera = mSceneMgr-> createCamera (nombre); si (pParent) pParent-> attachObject (pCamera); }

//Establezca el campo de visión //! todo ¿Es esto siempre en grados? pCamera-> setFOVy (Ogre :: Grado (FOV));

//Establecer la relación de aspecto pCamera-> setAspectRatio (aspectRatio);

//Establecer el tipo de proyección si (projectionType == "perspectiva") pCamera -> setProjectionType (PT_PERSPECTIVE); else if (projectionType == "ortográfica") pCamera-> setProjectionType (PT_ORTHOGRAPHIC);

TiXmlElement * pElement;

//recorte Proceso pElement = XMLNode-> FirstChildElement ("clipping") (?); si (pElement) {nearDist real = getAttribReal (pElement, "cerca"); pCamera-> setNearClipDistance (nearDist);

Bienes farDist = getAttribReal (pElement, "lejos"); pCamera-> setFarClipDistance (farDist); } //

posición Proceso pElement = XMLNode-> FirstChildElement ("posición") (?); si (pElement) pCamera-> setPosition (parseVector3 (pElement)); (?)

//rotación Proceso pElement = XMLNode-> FirstChildElement ("rotación"); si (pElement) pCamera-> setOrientation (parseQuaternio

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.