Changeset 663 for code/branches/FICN/src/orxonox/objects
- Timestamp:
- Dec 20, 2007, 8:01:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/SpaceshipSteeringObject.cc
r614 r663 32 32 void SpaceshipSteeringObject::loadParams(TiXmlElement* xmlElem) 33 33 { 34 34 SpaceshipSteering* steering = orxonox::Orxonox::getSingleton()->getSteeringPointer(); 35 35 36 37 38 39 40 41 42 36 if (xmlElem->Attribute("node") && xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft")) 37 { 38 std::string nodeStr = xmlElem->Attribute("node"); 39 std::string forwardStr = xmlElem->Attribute("forward"); 40 std::string rotateupdownStr = xmlElem->Attribute("rotateupdown"); 41 std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft"); 42 std::string looprightleftStr = xmlElem->Attribute("looprightleft"); 43 43 44 45 46 47 48 44 float forward, rotateupdown, rotaterightleft, looprightleft; 45 String2Number<float>(forward, forwardStr); 46 String2Number<float>(rotateupdown, rotateupdownStr); 47 String2Number<float>(rotaterightleft, rotaterightleftStr); 48 String2Number<float>(looprightleft, looprightleftStr); 49 49 50 50 steering = new SpaceshipSteering(forward, rotateupdown, rotaterightleft, looprightleft); 51 51 52 53 52 Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager(); 53 Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->getChild(nodeStr); 54 54 55 55 steering->addNode(sceneNode); 56 56 57 57 58 58 59 59 60 61 60 COUT(4) << "Loader: Initialized spaceship steering at node " << nodeStr << " values "<< forward << " " << rotateupdown << " "<< rotaterightleft << " "<< looprightleft << " "<< std::endl << std::endl; 61 } 62 62 } 63 63 }
Note: See TracChangeset
for help on using the changeset viewer.