Changeset 4444 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jun 1, 2005, 10:17:14 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/null_parent.cc
r4441 r4444 26 26 NullParent* NullParent::getInstance () 27 27 { 28 if(! singletonRef)29 singletonRef = new NullParent ();30 return singletonRef;28 if(!NullParent::singletonRef) 29 NullParent::singletonRef = new NullParent (); 30 return NullParent::singletonRef; 31 31 } 32 32 … … 35 35 this->setName("NullParent"); 36 36 this->setClassID(CL_NULL_PARENT, "NullParent"); 37 singletonRef = this;38 this->set Mode(PNODE_ALL);37 NullParent::singletonRef = this; 38 this->setParentMode(PNODE_ALL); 39 39 } 40 40 -
orxonox/trunk/src/lib/coord/p_node.cc
r4440 r4444 52 52 { 53 53 this->init(NULL); 54 this->loadParams(root); 55 54 56 NullParent::getInstance()->addChild(this); 55 57 } … … 291 293 use this to add a child to this node. 292 294 */ 293 void PNode::addChild (PNode* pNode, int parent ingMode)295 void PNode::addChild (PNode* pNode, int parentMode) 294 296 { 295 297 if( likely(pNode->parent != NULL)) … … 298 300 pNode->parent->children->remove(pNode); 299 301 } 300 pNode-> mode = parentingMode;302 pNode->parentMode = parentMode; 301 303 pNode->parent = this; 302 304 this->children->add(pNode); … … 332 334 while( pn != NULL) 333 335 { 334 nullParent->addChild(pn, pn->get Mode());336 nullParent->addChild(pn, pn->getParentMode()); 335 337 pn = iterator->nextElement(); 336 338 } … … 354 356 \param mode the mode of the bind-type. 355 357 */ 356 void PNode::setMode (int parentingMode) 357 { 358 this->mode = parentingMode; 359 } 360 361 362 /** 363 \brief gets the mode of this parent manualy 364 \return the mode of the bind-type. 365 */ 366 int PNode::getMode() const 367 { 368 return this->mode; 358 void PNode::setParentMode (unsigned int parentMode) 359 { 360 this->parentMode = parentMode; 369 361 } 370 362 … … 415 407 416 408 417 if( likely(this-> mode & PNODE_MOVEMENT))409 if( likely(this->parentMode & PNODE_MOVEMENT)) 418 410 { 419 411 if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) … … 437 429 } 438 430 439 if( this-> mode & PNODE_LOCAL_ROTATE)431 if( this->parentMode & PNODE_LOCAL_ROTATE) 440 432 { 441 433 if( unlikely(this->bAbsDirChanged) /*&& this->timeStamp != DataTank::timeStamp*/) … … 451 443 } 452 444 453 if( this-> mode & PNODE_ROTATE_MOVEMENT)445 if( this->parentMode & PNODE_ROTATE_MOVEMENT) 454 446 { 455 447 if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) -
orxonox/trunk/src/lib/coord/p_node.h
r4440 r4444 88 88 89 89 void setParent (PNode* parent); 90 void set Mode (int parentingMode);91 int get Mode() const;90 void setParentMode (unsigned int parentingMode); 91 int getParentMode() const { return this->parentMode; }; 92 92 93 93 void update (float dt); … … 122 122 tList<PNode>* children; //!< list of the children 123 123 124 unsigned int mode;//!< the mode of the binding124 unsigned int parentMode; //!< the mode of the binding 125 125 }; 126 126 -
orxonox/trunk/src/story_entities/world.cc
r4442 r4444 447 447 tn->addChild(this->localCamera); 448 448 localCamera->lookAt(tn); 449 localCamera->set Mode(PNODE_MOVEMENT);450 this->localPlayer->set Mode(PNODE_ALL);449 localCamera->setParentMode(PNODE_MOVEMENT); 450 this->localPlayer->setParentMode(PNODE_ALL); 451 451 Vector* cameraOffset = new Vector (0, 5, -10); 452 452 trackManager->condition(2, LEFTRIGHT, this->localPlayer); … … 625 625 this->spawn(this->sky); 626 626 this->localCamera->addChild(this->sky); 627 this->sky->set Mode(PNODE_MOVEMENT);627 this->sky->setParentMode(PNODE_MOVEMENT); 628 628 /*monitor progress*/ 629 629 this->glmis->step(); … … 659 659 660 660 tn->addChild(this->localCamera); 661 this->localPlayer->set Mode(PNODE_ALL);661 this->localPlayer->setParentMode(PNODE_ALL); 662 662 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 663 663 */ … … 1143 1143 entity->setRelCoor (*relCoor); 1144 1144 entity->setRelDir (*relDir); 1145 entity->set Mode(parentingMode);1145 entity->setParentMode(parentingMode); 1146 1146 1147 1147 this->entities->add (entity); -
orxonox/trunk/src/util/track/track_node.cc
r4440 r4444 37 37 NullParent::getInstance()->addChild(this); 38 38 this->trackManager = TrackManager::getInstance(); 39 this->setMode(PNODE_ALL); 40 } 41 42 43 TrackNode::TrackNode (const Vector& absCoordinate) 44 { 45 this->trackManager = TrackManager::getInstance(); 46 this->setMode(PNODE_ALL); 47 this->setAbsCoor(absCoordinate); 39 this->setParentMode(PNODE_ALL); 48 40 } 49 41 -
orxonox/trunk/src/world_entities/camera.cc
r4420 r4444 229 229 { 230 230 this->setClassID(CL_CAMERA_TARGET, "CameraTarget"); 231 this->set Mode(PNODE_MOVEMENT);231 this->setParentMode(PNODE_MOVEMENT); 232 232 } 233 233 -
orxonox/trunk/src/world_entities/skybox.cc
r4436 r4444 45 45 } 46 46 47 /** 48 \brief initializes a skybox from a XmlElement 49 */ 47 50 SkyBox::SkyBox(const TiXmlElement* root) 48 51 { … … 75 78 this->material[i]->setAmbient(2.0, 2.0, 2.0); 76 79 } 77 this->set Mode(PNODE_MOVEMENT);80 this->setParentMode(PNODE_MOVEMENT); 78 81 } 79 82 -
orxonox/trunk/src/world_entities/skysphere.cc
r4094 r4444 68 68 PRINTF(1)("initializing the Skysphere with Material %s.\n", fileName); 69 69 this->sphereObj = gluNewQuadric(); 70 this->set Mode(PNODE_MOVEMENT);70 this->setParentMode(PNODE_MOVEMENT); 71 71 72 72 gluQuadricTexture(this->sphereObj, GL_TRUE);
Note: See TracChangeset
for help on using the changeset viewer.