*   >> läser Utbildning artiklar >> science >> programming

Att göra en 3D-spel med Ogre - Laddar ett Scene

+ = morphLODFactorParamName; terrainConfig + = "\\ n"; }

String morphLODFactorParamIndex = getAttrib (XMLNode, "MorphLODFactorParamIndex"); om {terrainConfig + = "MorphLODFactorParamIndex =" (morphLODFactorParamIndex.size () = 0!); terrainConfig + = morphLODFactorParamIndex; terrainConfig + = "\\ n"; }

String lodMorphStart = getAttrib (XMLNode, "LODMorphStart"); if (lodMorphStart.size () = 0!) {terrainConfig + = "LODMorphStart ="; terrainConfig + = lodMorphStart; terrainConfig + = "\\ n"; }

void * pMem = OGRE_ALLOC_T (unsigned char, terrainConfig.

length () + 1, MEMCATEGORY_GENERAL); memset (pMem, 0, terrainConfig.length () + 1); memcpy (pMem, terrainConfig.c_str (), terrainConfig.length () + 1); DataStreamPtr PSTR (ny Ogre :: MemoryDataStream (pMem, terrainConfig.length () + 1, sant));

this-> mSceneMgr-> setWorldGeometry (PSTR);} Omdömen annullera DotSceneLoader :: processUserDataReference (TiXmlElement * XMLNode , SceneNode * pParent) {//! todo Genomföra detta} Omdömen void DotSceneLoader :: processOctree (TiXmlElement * XMLNode) {//! todo Genomföra detta} Omdömen void DotSceneLoader :: processLight (TiXmlElement * XMLNode, SceneNode * pParent) {//Process attribut String name = getAttrib (XMLNode, "namn"); String id = getAttrib (XMLNode, "id"),

//Skapa ljus Ljus * belägenhet = mSceneMgr-> createLight (namn); if (pParent) pParent-> attachObject (belägenhet);

String sValue = getAttrib (XMLNode, "typ"); if (sValue == "point") pLight-> setType (Ljus :: LT_POINT); else if (sValue == "riktad") pLight-> setType (Ljus :: LT_DIRECTIONAL); else if (sValue == "spot") pLight-> setType (Ljus :: LT_SPOTLIGHT); else if (sValue == "RADPOINT") pLight-> setType (Ljus :: LT_POINT);

pLight-> setVisible (getAttribBool (XMLNode, "synliga", true)); pLight-> setCastShadows (getAttribBool (XMLNode, "castShadows", true));

TiXmlElement * pElement,

//Process ställning pElement = XMLNode-> FirstChildElement ("position") (?); if (pElement) pLight-> setPosition (parseVector3 (pElement));

//Process normal pElement = XMLNode-> FirstChildElement ("normal") (?); if (pElement) pLight-> setDirection (parseVector3 (pElement)), (?) Review //Process colourDiffuse pElement = XMLNode-> FirstChildElement ("colourDiffuse"); if (pElement) pLight-> setDiffuseColour (parseColour (pElement)), (?) Review //Process colourSpecular pElement = XMLNode-> FirstChildElement ("colourSpecular"); if (pElement) pLight-> setSpecularColour (parseColour (pElement)), (?) Review //Process lightRange pElement = XMLNode->

Page   <<  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... >>  >> 
Copyright © 2008 - 2016 läser Utbildning artiklar,https://utbildning.nmjjxx.com All rights reserved.