//Prosessi lightAttenuation (?) pElement = XMLNode-> FirstChildElement ("lightAttenuation"); jos (pElement) processLightAttenuation (pElement, ahdinko);
//Prosessi userDataReference (?) pElement = XMLNode-> FirstChildElement ("userDataReference"); jos (pElement); //processUserDataReference (pElement, ahdinko);}
mitätöidä DotSceneLoader :: processCamera (TiXmlElement * XMLNode, SceneNode * pParent) {//prosessin ominaisuuksien String nimi = getAttrib (XMLNode, "nimi"); String id = getAttrib (XMLNode, "id"); Real FoV = getAttribReal (XMLNode, "fov", 45); Real aspectRatio = getAttribReal (XMLNode, "aspectRatio", 1,3333); String projectionType = getAttrib (XMLNode, "projectionType", "näkökulma");
//Etsi olemassa oleva cmaera Kamera * pCamera = mSceneMgr-> getCamera (nimi); jos (pCamera == NULL) {//Luo kamera Kameran * pCamera = mSceneMgr-> createCamera (nimi); jos (pParent) pParent-> attachObject (pCamera); }
//Aseta field-of-view //! todo Onko tämä aina asteina? pCamera-> setFOVy (Ogre :: tutkinto (FOV));
//Aseta kuvasuhde pCamera-> setAspectRatio (aspectRatio);
//Aseta projektiotyyppi jos (projectionType == "näkökulma") pCamera -> setProjectionType (PT_PERSPECTIVE); if (projectionType == "ortografisia") pCamera-> setProjectionType (PT_ORTHOGRAPHIC);
TiXmlElement * pElement;
//Prosessi leikkaus (?) pElement = XMLNode-> FirstChildElement ("leikkaus"); jos (pElement) {Real nearDist = getAttribReal (pElement, "lähellä"); pCamera-> setNearClipDistance (nearDist);
Real farDist = getAttribReal (pElement, "kaukana"); pCamera-> setFarClipDistance (farDist); }
//Prosessi kanta (?) PElement = XMLNode-> FirstChildElement ("asennossa"); jos (pElement) pCamera-> setPosition (parseVector3 (pElement));
//Prosessi kierto (?) pElement = XMLNode-> FirstChildElement ("kierto"); jos (pElement) pCamera-> setOrientation (parseQuaternion (pElement));
pElement = XMLNode-> FirstChildElement ("lookAt"); jos (pElement) pCamera-> lookAt (parseVector3 (pElement));
//prosessin normaali (?) pElement = XMLNode-> FirstChildElement ("normaali"); jos (pElement); //! //Prosessi lookTarget (?) PElement = XMLNode-> FirstChildElement ("lookTarget"); jos (pElement); //! //Prosessi trackTarget (?) PElement = XMLNode-> FirstChildElement ("trackTarget"); jos (pElement); //! //Prosessi userDataReference (?) PElement = XMLNode-> FirstChildElement ("userDataReference");