Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3537 in orxonox.OLD for orxonox/trunk


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
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/camera.cc

    r3365 r3537  
    171171        {
    172172          //FIXME: camera should be made via relative coordinates
    173           Vector* cameraOffset = new Vector (-10, 5, 0);
    174           this->setRelCoor (cameraOffset);
     173
    175174        }
    176175      else
  • 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
  • orxonox/trunk/src/story_entities/world.cc

    r3535 r3537  
    219219            this->localCamera->setName ("camera");
    220220            this->localCamera->bind (myPlayer);
    221             this->localPlayer->addChild (this->localCamera);
    222221            /*monitor progress*/
    223222            this->glmis->step();           
     
    248247            //      trackManager->setBindSlave(env);
    249248            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);
    251253            trackManager->condition(1, NEAREST, myPlayer);
    252254
  • orxonox/trunk/src/world_entities/primitive.cc

    r3531 r3537  
    5151  Vector v(0.0, 0.0, 1.0);
    5252  Quaternion q(10.0, v);
    53   this->relDirection = this->relDirection * q;
     53  //this->relDirection = this->relDirection * q;
    5454}
    5555
Note: See TracChangeset for help on using the changeset viewer.