Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4444 in orxonox.OLD for orxonox/trunk/src/lib


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

orxonox/trunk: setMode → setParentMode

Location:
orxonox/trunk/src/lib/coord
Files:
3 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
Note: See TracChangeset for help on using the changeset viewer.