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

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

lere DotSceneLoader :: processEnvironment (TiXmlElement * XMLNode) {TiXmlElement * pElement, (?)

//Process tåke pElement = XMLNode-> FirstChildElement ("tåke"); if (pElement) processFog (pElement);

//Process skybox pElement = XMLNode-> FirstChildElement ("Skybox") (?); if (pElement) processSkyBox (pElement);

//Process skydome pElement = XMLNode-> FirstChildElement ("skydome") (?); if (pElement) processSkyDome (pElement);

//Process skyPlane pElement = XMLNode-> FirstChildElement ("skyPlane") (?); if (pElement) processSkyPlane (pElement), (?)

//Process klipping pElement = XMLNode-> FirstChildElement ("klipping"); if (pElement) processClipping (pElement);

//Process colourAmbient pElement = XMLNode-> FirstChildElement ("colourAmbient") (?); if (pElement) mSceneMgr-> setAmbientLight (parseColour (pElement));

//Process colourBackground //(?)! todo Sett bakgrunnsfargen på alle visningsfeltene (RenderWindow må gis da) pElement = XMLNode-> FirstChildElement ("colourBackground"); if (pElement); //mSceneMgr-> set (parseColour (pElement)); (?)

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

annullere DotSceneLoader :: processTerrain (TiXmlElement * XMLNode) {std :: string terrainConfig; String worldTexture = getAttrib (XMLNode, "WorldTexture"); if (worldTexture.

size () = 0) {terrainConfig + = "WorldTexture ="; terrainConfig + = worldTexture; terrainConfig + = "\\ n"; }

String detailTexture = getAttrib (XMLNode, "DetailTexture"); if (detailTexture.size () = 0) {terrainConfig + = "DetailTexture ="; terrainConfig + = detailTexture; terrainConfig + = "\\ n"; }

String detailTile = getAttrib (XMLNode, "DetailTile"); if (detailTile.size () = 0) {terrainConfig + = "DetailTile ="; terrainConfig + = detailTile; terrainConfig + = "\\ n"; } String kildetekst = getAttrib (XMLNode, "kildetekst"); if (pageSource.

size () = 0) {terrainConfig + = "kildetekst ="; terrainConfig + = kildetekst; terrainConfig + = "\\ n"; }

String heightmapImage = getAttrib (XMLNode, "Heightmap.image"); if (heightmapImage.size () = 0) {terrainConfig + = "Heightmap.image ="; terrainConfig + = heightmapImage; terrainConfig + = "\\ n"; }

String heightmapRawSize = getAttrib (XMLNode, "Heightmap.raw.size"); if (heightmapRawSize.size () = 0) {terrainConfig + = "Heightmap.raw.size ="; terrainConfig + = heightmapRawSize; terrainConfig + = "\\ n"; }

Strin

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