//Process planet (*) pElement = XMLNode-> FirstChildElement ("flyet"); while (pElement) {processPlane (pElement, pNode); pElement = pElement-> NextSiblingElement ("flyet"); }
//Process userDataReference pElement = XMLNode-> FirstChildElement ("userDataReference") (?); if (pElement) processUserDataReference (pElement, pNode);}
annullere DotSceneLoader :: processLookTarget (TiXmlElement * XMLNode, SceneNode * pParent) {//! todo Er dette riktig? Fordi jeg ikke har en anelse faktisk
//Process attributter String nodename = getAttrib (XMLNode, "nodename");
Node :: TransformSpace relativeTo = Node :: TS_PARENT; String Sverdi = getAttrib (XMLNode, "relativeTo"); if (Sverdi == "lokal") relativeTo = Node :: TS_LOCAL; else if (Sverdi == "foreldre") relativeTo = Node :: TS_PARENT; else if (Sverdi == "verden") relativeTo = Node :: TS_WORLD;
TiXmlElement * pElement;
//Process posisjon Vector3 posisjon (?); pElement = XMLNode-> FirstChildElement ("stilling"); if (pElement) stilling = parseVector3 (pElement);
//Process localDirection Vector3 localDirection = Vector3 :: NEGATIVE_UNIT_Z (?); pElement = XMLNode-> FirstChildElement ("localDirection"); if (pElement) localDirection = parseVector3 (pElement);
//Setup utseendet målet prøve {if (nodeName.
empty ()) {SceneNode * pLookNode = mSceneMgr-> getSceneNode (nodename); stilling = pLookNode -> _ getDerivedPosition (); }
pParent-> lookat (posisjon, relativeTo, localDirection); } Catch (Ogre :: Unntak & /* e * /) {LogManager :: getSingleton () logMessage ("[DotSceneLoader] Feil behandler en titt mål!").
; }}
annullere DotSceneLoader :: processTrackTarget (TiXmlElement * XMLNode, SceneNode * pParent) {//Process attributter String nodename = getAttrib (XMLNode, "nodename");
TiXmlElement * pElement;
//Process localDirection Vector3 localDirection = Vector3 :: NEGATIVE_UNIT_Z (?); pElement = XMLNode-> FirstChildElement ("localDirection"); if (pElement) localDirection = parseVector3 (pElement);
//Process offset Vector3 offset = Vector3 :: ZERO (?); pElement = XMLNode-> FirstChildElement ("offset"); if (pElement) offset = parseVector3 (pElement);
//Setup sporet målet prøve {SceneNode * pTrackNode = mSceneMgr-> getSceneNode (nodename); pParent-> setAutoTracking (sant, pTr