*   >> Lese Utdanning Artikler >> science >> programming

Å gjøre en 3D-spill med Ogre - Legge en Scene

FirstChildElement ("lightRange"); if (pElement) processLightRange (pElement, sørgelig forfatning);

//Process lightAttenuation pElement = XMLNode-> FirstChildElement ("lightAttenuation") (?); if (pElement) processLightAttenuation (pElement, sørgelig forfatning);

//Process userDataReference pElement = XMLNode-> FirstChildElement ("userDataReference") (?); if (pElement); //processUserDataReference (pElement, sørgelig forfatning);}

annullere DotSceneLoader :: processCamera (TiXmlElement * XMLNode, SceneNode * pParent) {//Process attributter String name = getAttrib (XMLNode, "navn"); String id = getAttrib (XMLNode, "id"); Ekte FOV = getAttribReal (XMLNode, "FOV", 45); Ekte aspectRatio = getAttribReal (XMLNode, "aspectRatio", 1,3333); String projectionType = getAttrib (XMLNode, "projectionType", "perspektiv");

//Finn en eksisterende cmaera Kamera * pCamera = mSceneMgr-> getCamera (navn); if (pCamera == NULL) {//Opprett kameraet Kamera * pCamera = mSceneMgr-> createCamera (navn); if (pParent) pParent-> attachObject (pCamera); }

//Sett felt-of-view //! todo Er dette alltid i grader? pCamera-> setFOVy (Ogre :: Degree (FOV));

//Angi sideforholdet pCamera-> setAspectRatio (aspectRatio);

//Sett projeksjon typen if (projectionType == "perspektiv") pCamera -> setProjectionType (PT_PERSPECTIVE); else if (projectionType == "ortografiske") pCamera-> setProjectionType (PT_ORTHOGRAPHIC);

TiXmlElement * pElement;

//Process klipping pElement = XMLNode-> FirstChildElement ("klipping") (?); if (pElement) {Fast nearDist = getAttribReal (pElement, "nær"); pCamera-> setNearClipDistance (nearDist);

Fast farDist = getAttribReal (pElement, "langt"); pCamera-> setFarClipDistance (farDist); }

//Process posisjon pElement = XMLNode-> FirstChildElement ("posisjon") (?); if (pElement) pCamera-> setPosition (parseVector3 (pElement)); (?)

//Process rotasjon pElement = XMLNode-> FirstChildElement ("rotasjon"); if (pElement) pCamera-> setOrientation (parseQuaternion (pElement));

pElement = XMLNode-> FirstChildElement ("lookat"); if (pElement) pCamera-> lookat (parseVector3 (pElement));

//Process normal pElement = XMLNode-> FirstChildElement ("normal") (?); if (pElement); //! //Process lookTarget pElement = XMLNode-> FirstChildElement ("lookTarget") (?); if (pElement); //! //Process trackTarget pElement = XMLNode-> FirstChildElement ("trackTarget") (?); if (pElement); //! //Process userDataReference pElement = XMLNode->

Page   <<  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... >>  >> 
Copyright © 2008 - 2016 Lese Utdanning Artikler,https://utdanning.nmjjxx.com All rights reserved.