Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4444 in orxonox.OLD


Ignore:
Timestamp:
Jun 1, 2005, 10:17:14 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: setMode → setParentMode

Location:
orxonox/trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/null_parent.cc

    r4441 r4444  
    2626NullParent* NullParent::getInstance ()
    2727{
    28   if(!singletonRef)
    29     singletonRef = new NullParent ();
    30   return singletonRef;
     28  if(!NullParent::singletonRef)
     29    NullParent::singletonRef = new NullParent ();
     30  return NullParent::singletonRef;
    3131}
    3232
     
    3535  this->setName("NullParent");
    3636  this->setClassID(CL_NULL_PARENT, "NullParent");
    37   singletonRef = this;
    38   this->setMode(PNODE_ALL);
     37  NullParent::singletonRef = this;
     38  this->setParentMode(PNODE_ALL);
    3939}
    4040
  • orxonox/trunk/src/lib/coord/p_node.cc

    r4440 r4444  
    5252{
    5353  this->init(NULL);
     54  this->loadParams(root);
     55 
    5456  NullParent::getInstance()->addChild(this);
    5557}
     
    291293   use this to add a child to this node.
    292294*/
    293 void PNode::addChild (PNode* pNode, int parentingMode)
     295void PNode::addChild (PNode* pNode, int parentMode)
    294296{
    295297  if( likely(pNode->parent != NULL))
     
    298300      pNode->parent->children->remove(pNode);
    299301    }
    300   pNode->mode = parentingMode;
     302  pNode->parentMode = parentMode;
    301303  pNode->parent = this;
    302304  this->children->add(pNode);
     
    332334  while( pn != NULL)
    333335    {
    334       nullParent->addChild(pn, pn->getMode());
     336      nullParent->addChild(pn, pn->getParentMode());
    335337      pn = iterator->nextElement();
    336338    }
     
    354356   \param mode the mode of the bind-type.
    355357*/
    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;
     358void PNode::setParentMode (unsigned int parentMode)
     359{
     360  this->parentMode = parentMode;
    369361}
    370362
     
    415407
    416408
    417       if( likely(this->mode & PNODE_MOVEMENT))
     409      if( likely(this->parentMode & PNODE_MOVEMENT))
    418410        {
    419411          if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/)
     
    437429        }
    438430 
    439       if( this->mode & PNODE_LOCAL_ROTATE)
     431      if( this->parentMode & PNODE_LOCAL_ROTATE)
    440432        {
    441433          if( unlikely(this->bAbsDirChanged) /*&& this->timeStamp != DataTank::timeStamp*/)
     
    451443        }
    452444 
    453       if( this->mode & PNODE_ROTATE_MOVEMENT)
     445      if( this->parentMode & PNODE_ROTATE_MOVEMENT)
    454446        {
    455447          if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/)
  • orxonox/trunk/src/lib/coord/p_node.h

    r4440 r4444  
    8888
    8989  void setParent (PNode* parent);
    90   void setMode (int parentingMode);
    91   int getMode() const;
     90  void setParentMode (unsigned int parentingMode);
     91  int getParentMode() const { return this->parentMode; };
    9292
    9393  void update (float dt);
     
    122122  tList<PNode>*   children;           //!< list of the children
    123123
    124   unsigned int    mode;               //!< the mode of the binding
     124  unsigned int    parentMode;         //!< the mode of the binding
    125125};
    126126
  • orxonox/trunk/src/story_entities/world.cc

    r4442 r4444  
    447447  tn->addChild(this->localCamera);
    448448  localCamera->lookAt(tn);
    449   localCamera->setMode(PNODE_MOVEMENT);
    450   this->localPlayer->setMode(PNODE_ALL);
     449  localCamera->setParentMode(PNODE_MOVEMENT);
     450  this->localPlayer->setParentMode(PNODE_ALL);
    451451  Vector* cameraOffset = new Vector (0, 5, -10);
    452452  trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     
    625625        this->spawn(this->sky);
    626626        this->localCamera->addChild(this->sky);
    627         this->sky->setMode(PNODE_MOVEMENT);
     627        this->sky->setParentMode(PNODE_MOVEMENT);
    628628        /*monitor progress*/
    629629        this->glmis->step();
     
    659659       
    660660        tn->addChild(this->localCamera);
    661         this->localPlayer->setMode(PNODE_ALL);
     661        this->localPlayer->setParentMode(PNODE_ALL);
    662662        trackManager->condition(2, LEFTRIGHT, this->localPlayer);
    663663        */
     
    11431143      entity->setRelCoor (*relCoor);
    11441144      entity->setRelDir (*relDir);
    1145       entity->setMode(parentingMode);
     1145      entity->setParentMode(parentingMode);
    11461146     
    11471147      this->entities->add (entity);
  • orxonox/trunk/src/util/track/track_node.cc

    r4440 r4444  
    3737  NullParent::getInstance()->addChild(this);
    3838  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);
    4840}
    4941
  • orxonox/trunk/src/world_entities/camera.cc

    r4420 r4444  
    229229{
    230230  this->setClassID(CL_CAMERA_TARGET, "CameraTarget");
    231   this->setMode(PNODE_MOVEMENT);
     231  this->setParentMode(PNODE_MOVEMENT);
    232232}
    233233
  • orxonox/trunk/src/world_entities/skybox.cc

    r4436 r4444  
    4545}
    4646
     47/**
     48   \brief initializes a skybox from a XmlElement
     49*/
    4750SkyBox::SkyBox(const TiXmlElement* root)
    4851{
     
    7578      this->material[i]->setAmbient(2.0, 2.0, 2.0);
    7679    }
    77   this->setMode(PNODE_MOVEMENT);
     80  this->setParentMode(PNODE_MOVEMENT);
    7881}
    7982
  • orxonox/trunk/src/world_entities/skysphere.cc

    r4094 r4444  
    6868  PRINTF(1)("initializing the Skysphere with Material %s.\n", fileName);
    6969  this->sphereObj = gluNewQuadric();
    70   this->setMode(PNODE_MOVEMENT);
     70  this->setParentMode(PNODE_MOVEMENT);
    7171
    7272  gluQuadricTexture(this->sphereObj, GL_TRUE);
Note: See TracChangeset for help on using the changeset viewer.