Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Mar 14, 2005, 12:12:12 AM (20 years ago)
Author:
patrick
Message:

orxonox/trank: worked on removing alg. from pnode and changed a little on camera for the new tackmanager

Location:
orxonox/trunk/src/lib/coord
Files:
2 edited

Legend:

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

    r3535 r3537  
    334334void PNode::removeChild (PNode* pNode)
    335335{
     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
    336347  this->children->remove (pNode);
    337348  pNode->parent = NULL;
     
    340351
    341352/**
     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*/
     357void 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/**
    342371   \brief sets the parent of this PNode
    343372   \param parent the Parent to set
     
    356385{
    357386  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*/
     394parentingMode PNode::getMode()
     395{
     396  return this->mode;
    358397}
    359398
  • orxonox/trunk/src/lib/coord/p_node.h

    r3535 r3537  
    4545  tList<PNode>* children;   //!< list of the children
    4646
    47   parentingMode mode;       //!< the mode of the binding
     47
    4848
    4949  Vector getRelCoor ();
     
    6565  void addChild (PNode* pNode, parentingMode mode);
    6666  void removeChild (PNode* pNode);
     67  void remove();
     68
     69
    6770  void setParent (PNode* parent);
    6871  void parentCoorChanged ();
    6972  void parentDirChanged ();
    7073  void setMode (parentingMode mode);
     74  parentingMode getMode();
    7175
    7276  virtual void update (float timeStamp);
     
    9599  Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
    96100
     101  parentingMode mode;       //!< the mode of the binding
     102
    97103};
    98104
Note: See TracChangeset for help on using the changeset viewer.