*   >> Læs Uddannelse artikler >> science >> programming

Realiseringen af ​​et 3D-spil med Ogre - Indlæsning af en Scene

Node * pParent) {//! todo gennemføre denne}

ugyldiggøre DotSceneLoader :: processPlane (TiXmlElement * XMLNode, SceneNode * pParent) {//! todo gennemføre denne}

ugyldiggøre DotSceneLoader :: processFog (TiXmlElement * XMLNode) {//Proces attributter Rigtig expDensity = getAttribReal (XMLNode "expDensity", 0,001); Rigtig linearStart = getAttribReal (XMLNode "linearStart", 0,0); Rigtig linearEnd = getAttribReal (XMLNode "linearEnd", 1,0);

FogMode mode = FOG_NONE; String $ mode = getAttrib (XMLNode, "mode"); if ($ mode == "ingen") mode = FOG_NONE; ellers hvis ($ mode == "EXP") mode = FOG_EXP; ellers hvis ($ mode == "EXP2") mode = FOG_EXP2; ellers hvis ($ mode == "lineære") mode = FOG_LINEAR;

TiXmlElement * pElement;

//Proces colourDiffuse ColourValue colourDiffuse = ColourValue :: Hvid (?); pElement = XMLNode-> FirstChildElement ("colourDiffuse"); hvis (pElement) colourDiffuse = parseColour (pElement)

//Opsætning tågen mSceneMgr-> setFog (tilstand, colourDiffuse, expDensity, linearStart, linearEnd);}

ugyldiggøre DotSceneLoader :: processSkyBox (TiXmlElement * XMLNode) { //Proces attributter String materiale = getAttrib (XMLNode, "materiale"); Rigtig afstand = getAttribReal (XMLNode "afstand", 5000); bool drawFirst = getAttribBool (XMLNode, "drawFirst", true);

TiXmlElement * pElement;

//Proces rotation quaternion rotation = quaternion :: IDENTITET (?); pElement = XMLNode-> FirstChildElement ("rotation"); hvis (pElement) rotation = parseQuaternion (pElement)

//Opsætning himlen boksen mSceneMgr-> setSkyBox (sand, materiale, afstand, drawFirst, rotation, m_sGroupName);}

ugyldiggøre DotSceneLoader :: processSkyDome (TiXmlElement * XMLNode) {//Proces attributter String materiale = XMLNode-> Attribut ("materiale"); Rigtig krumning = getAttribReal (XMLNode "krumning", 10); Rigtig flisebelægning = getAttribReal (XMLNode "fliser", 8); Rigtig afstand = getAttribReal (XMLNode "afstand", 4000); bool drawFirst = getAttribBool (XMLNode, "drawFirst", true);

TiXmlElement * pElement;

//Proces rotation quaternion rotation = quaternion :: IDENTITET (?); pElement = XMLNode-> FirstChildElement ("rotation"); hvis (pElement) rotation = parseQuaternion (pElement)

//Opsætning himlen kuppel mSceneMgr-> setSkyDome (sand, materiale, krumning, fliser, afstand, drawFirst, rotation, 16, 16, -1, m_sGroupName);}

ugyldig DotSceneLoader :: processSkyPlane (TiXmlElement * XMLNode) {//Proces attributter String materiale = g

Page    << <<  [11] [12] [13] >>
Copyright © 2008 - 2016 Læs Uddannelse artikler,https://uddannelse.nmjjxx.com All rights reserved.