Changeset 3537 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 14, 2005, 12:12:12 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/camera.cc
r3365 r3537 171 171 { 172 172 //FIXME: camera should be made via relative coordinates 173 Vector* cameraOffset = new Vector (-10, 5, 0); 174 this->setRelCoor (cameraOffset); 173 175 174 } 176 175 else -
orxonox/trunk/src/lib/coord/p_node.cc
r3535 r3537 334 334 void PNode::removeChild (PNode* pNode) 335 335 { 336 /* 337 PNode* pn = this->children->enumerate(); 338 while( pn != NULL) 339 { 340 this->removeChild(pn); 341 np->addChild(pn, pn->getMode()); 342 pn = this->children->nextElement(); 343 } 344 345 */ 346 336 347 this->children->remove (pNode); 337 348 pNode->parent = NULL; … … 340 351 341 352 /** 353 \brief remove this pnode from the tree and adds all following to NullParent 354 355 this can be the case, if an entity in the world is been destroyed. 356 */ 357 void PNode::remove() 358 { 359 NullParent* np = NullParent::getInstance(); 360 PNode* pn = this->children->enumerate(); 361 while( pn != NULL) 362 { 363 this->children->remove(pn); 364 np->addChild(pn, pn->getMode()); 365 pn = this->children->nextElement(); 366 } 367 } 368 369 370 /** 342 371 \brief sets the parent of this PNode 343 372 \param parent the Parent to set … … 356 385 { 357 386 this->mode = mode; 387 } 388 389 390 /** 391 \brief gets the mode of this parent manualy 392 \return the mode of the bind-type. 393 */ 394 parentingMode PNode::getMode() 395 { 396 return this->mode; 358 397 } 359 398 -
orxonox/trunk/src/lib/coord/p_node.h
r3535 r3537 45 45 tList<PNode>* children; //!< list of the children 46 46 47 parentingMode mode; //!< the mode of the binding 47 48 48 49 49 Vector getRelCoor (); … … 65 65 void addChild (PNode* pNode, parentingMode mode); 66 66 void removeChild (PNode* pNode); 67 void remove(); 68 69 67 70 void setParent (PNode* parent); 68 71 void parentCoorChanged (); 69 72 void parentDirChanged (); 70 73 void setMode (parentingMode mode); 74 parentingMode getMode(); 71 75 72 76 virtual void update (float timeStamp); … … 95 99 Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) ) 96 100 101 parentingMode mode; //!< the mode of the binding 102 97 103 }; 98 104 -
orxonox/trunk/src/story_entities/world.cc
r3535 r3537 219 219 this->localCamera->setName ("camera"); 220 220 this->localCamera->bind (myPlayer); 221 this->localPlayer->addChild (this->localCamera);222 221 /*monitor progress*/ 223 222 this->glmis->step(); … … 248 247 // trackManager->setBindSlave(env); 249 248 TrackNode::getInstance()->addChild(myPlayer); 250 localCamera->setParent(TrackNode::getInstance()); 249 //localCamera->setParent(TrackNode::getInstance()); 250 this->localPlayer->addChild (this->localCamera); 251 Vector* cameraOffset = new Vector (0, 5, -10); 252 this->localCamera->setRelCoor (cameraOffset); 251 253 trackManager->condition(1, NEAREST, myPlayer); 252 254 -
orxonox/trunk/src/world_entities/primitive.cc
r3531 r3537 51 51 Vector v(0.0, 0.0, 1.0); 52 52 Quaternion q(10.0, v); 53 this->relDirection = this->relDirection * q;53 //this->relDirection = this->relDirection * q; 54 54 } 55 55
Note: See TracChangeset
for help on using the changeset viewer.