*   >> lukeminen koulutus Artikkelit >> science >> programming

Making 3D-peli, jossa Ogre - lataaminen Scene

hLODFactorParamIndex = getAttrib (XMLNode "MorphLODFactorParamIndex"); jos (morphLODFactorParamIndex.size ()! = 0) {terrainConfig + = "MorphLODFactorParamIndex ="; terrainConfig + = morphLODFactorParamIndex; terrainConfig + = "\\ n"; }

String lodMorphStart = getAttrib (XMLNode "LODMorphStart"); jos (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 (uusi Ogre :: MemoryDataStream (pMem, terrainConfig.length () + 1, tosi));

this-> mSceneMgr-> setWorldGeometry (pStr);}

mitätöidä DotSceneLoader :: processUserDataReference (TiXmlElement * XMLNode , SceneNode * pParent) {//! todo Toteuta tämä}

mitätöi DotSceneLoader :: processOctree (TiXmlElement * XMLNode) {//! todo Toteuta tämä}

mitätöi DotSceneLoader :: processLight (TiXmlElement * XMLNode, SceneNode * pParent) {//prosessin ominaisuuksien String nimi = getAttrib (XMLNode, "nimi"); String id = getAttrib (XMLNode, "id");

//Luo Valon * ahdinko = mSceneMgr-> createLight (nimi); jos (pParent) pParent-> attachObject (ahdinko);

String sValue = getAttrib (XMLNode, "tyyppi"); jos (sValue == "piste") pLight-> setType (Light :: LT_POINT); muuten jos (sValue == "suuntaava") pLight-> setType (Light :: LT_DIRECTIONAL); if (sValue == "spot") pLight-> setType (Light :: LT_SPOTLIGHT); if (sValue == "radPoint") pLight-> setType (Light :: LT_POINT);

pLight-> setVisible (getAttribBool (XMLNode, "näkyvä", true)); pLight-> setCastShadows (getAttribBool (XMLNode, "castShadows", true));

TiXmlElement * pElement;

//Prosessi kanta (?) pElement = XMLNode-> FirstChildElement ("asennossa"); jos (pElement) pLight-> setPosition (parseVector3 (pElement));

//prosessin normaali (?) pElement = XMLNode-> FirstChildElement ("normaali"); jos (pElement) pLight-> setDirection (parseVector3 (pElement));

//Menetelmä colourDiffuse (?) pElement = XMLNode-> FirstChildElement ("colourDiffuse"); jos (pElement) pLight-> setDiffuseColour (parseColour (pElement));

//Menetelmä colourSpecular (?) pElement = XMLNode-> FirstChildElement ("colourSpecular"); jos (pElement) pLight-> setSpecularColour (parseColour (pElement));

//Menetelmä lightRange (?) pElement = XMLNode-> FirstChildElement ("

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