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

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

setDiffuseColour (parseColour (pElement)); (?)

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

//Proces lightRange pElement = XMLNode-> FirstChildElement ("lightRange"); if (pElement) processLightRange (pElement, lot);

//Process lightAttenuation pElement = XMLNode-> FirstChildElement ("lightAttenuation") (?); if (pElement) processLightAttenuation (pElement, lot);

//Process userDataReference pElement = XMLNode-> FirstChildElement ("userDataReference") (?); if (pElement); //processUserDataReference (pElement, lot);}

ongeldig DotSceneLoader :: processCamera (TiXmlElement * XMLNode, SceneNode * pParent) {//Proces attributen String naam = getAttrib (XMLNode, "naam"); String id = getAttrib (XMLNode, "id"); Real FOV = getAttribReal (XMLNode, "FOV", 45); Real aspectRatio = getAttribReal (XMLNode, "aspectRatio", 1,3333); String projectionType = getAttrib (XMLNode, "projectionType", "perspectief"); //

Zoek een bestaande CMAERA Camera * pCamera = mSceneMgr-> getCamera (naam); if (pCamera == NULL) {//Maak de camera Camera * pCamera = mSceneMgr-> createCamera (naam); if (pParent) pParent-> attachObject (pCamera); } //

Stel het veld-of-view //! todo Is dit altijd in graden? pCamera-> setFOVy (Ogre :: Degree (FOV));

//Stel de beeldverhouding pCamera-> setAspectRatio (aspectRatio);

//Stel het projectie als (projectionType == "perspectief") pCamera -> setProjectionType (PT_PERSPECTIVE); anders als (projectionType == "orthographic") pCamera-> setProjectionType (PT_ORTHOGRAPHIC);

TiXmlElement * pElement;

//Proces knippen pElement = XMLNode-> FirstChildElement ("clipping") (?); if (pElement) {Real nearDist = getAttribReal (pElement, "in de buurt"); pCamera-> setNearClipDistance (nearDist);

Real farDist = getAttribReal (pElement, "ver"); pCamera-> setFarClipDistance (farDist); } //

Proces positie pElement = XMLNode-> FirstChildElement ("stand") (?); if (pElement) pCamera-> SetPosition (parseVector3 (pElement)); (?)

//Proces rotatie pElement = XMLNode-> FirstChildElement ("rotatie"); if (pElement) pCamera-> setOrientation (parseQuaternion (pElement));

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

//Process normale pElement = XMLNode-> FirstChildElement ("normaal") (?); 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 Lezen Onderwijs artikelen,https://onderwijs.nmjjxx.com All rights reserved.