Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3810 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Apr 13, 2005, 10:38:39 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: changed pnode interface of setRelCoor and setRelDir

Location:
orxonox/trunk/src
Files:
6 edited

Legend:

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

    r3675 r3810  
    143143    {
    144144      tmpPos = tmpPos + *this->getRelCoor();
    145       this->setRelCoor(&tmpPos);
     145      this->setRelCoor(tmpPos);
    146146    }
    147147}
  • orxonox/trunk/src/defs/stdincl.h

    r3800 r3810  
    3232/* performance tweaking stuff */
    3333#ifdef __unix__
    34  #include <glib-2.0/glib/gmacros.h>
    35  #define __LIKELY_IF(condition)  if( G_LIKELY(condition))
    36  #define __UNLIKELY_IF(condition) if( G_UNLIKELY(condition))
     34 #include <linux/compiler.h>
     35 #define __LIKELY_IF(condition)  if( likely(condition))
     36 #define __UNLIKELY_IF(condition) if( unlikely(condition))
    3737#else
    3838 #define __LIKELY_IF(condition)  if( condition)
  • orxonox/trunk/src/lib/coord/p_node.cc

    r3809 r3810  
    115115}
    116116
    117 /**
    118    \brief deletes the hole pnode tree
    119 
    120    cleans up all pnodes
    121 */
    122 /*
    123 void PNode::destroy ()
    124 {
    125   PNode* pn = this->children->enumerate();
    126   while( pn != NULL)
    127     {
    128       pn->destroy ();
    129       pn = this->children->nextElement();
    130     }
    131   // this deletes all children in the list
    132   this->children->destroy ();
    133 
    134   static_cast<BaseObject*>(this)->destroy();
    135 }
    136 */
     117
    137118
    138119/**
     
    155136   has changed and won't update the children Nodes.
    156137*/
     138/*
    157139void PNode::setRelCoor (Vector* relCoord)
    158140{
     
    160142  *this->relCoordinate = *relCoord;
    161143}
     144*/
    162145
    163146
     
    170153   has changed and won't update the children Nodes.
    171154*/
    172 void PNode::setRelCoor (Vector relCoord)
     155void PNode::setRelCoor (const Vector& relCoord)
    173156{
    174157  this->bRelCoorChanged = true;
     
    302285   has changed and won't update the children Nodes.
    303286*/
     287/*
    304288void PNode::setRelDir (Quaternion* relDir)
    305289{
     
    307291  *this->relDirection = *relDir;
    308292}
    309 
    310 
    311 void PNode::setRelDir (Quaternion relDir)
     293*/
     294
     295
     296void PNode::setRelDir (const Quaternion& relDir)
    312297{
    313298  this->bRelCoorChanged = true;
     
    332317   has changed and won't update the children Nodes.
    333318*/
     319/*
    334320void PNode::setAbsDir (Quaternion* absDir)
    335321{
     
    337323  *this->absDirection = *absDir;
    338324}
     325*/
    339326
    340327
     
    348335   has changed and won't update the children Nodes.
    349336*/
    350 void PNode::setAbsDir (Quaternion absDir)
     337void PNode::setAbsDir (const Quaternion& absDir)
    351338{
    352339  this->bAbsDirChanged = true;
     
    405392   \todo implement this
    406393*/
    407 void PNode::shiftDir (Quaternion shift)
     394/*
     395void PNode::shiftDir (Quaternion* shift)
    408396{}
     397*/
    409398
    410399
  • orxonox/trunk/src/lib/coord/p_node.h

    r3809 r3810  
    5858
    5959  inline Vector* getRelCoor () const { return this->relCoordinate; }
    60   void setRelCoor (Vector* relCoord);
    61   void setRelCoor (Vector relCoord);
     60  void setRelCoor (const Vector& relCoord);
    6261  inline Vector getAbsCoor () const { return *this->absCoordinate; }
    63   //void setAbsCoor (Vector* absCoord);
    6462  void setAbsCoor (const Vector& absCoord);
    6563  void shiftCoor (Vector* shift);
    6664  void shiftCoor (const Vector& shift);
    67   //void shiftCoor (Vector shift);
    6865
    6966  inline Quaternion getRelDir () const { return *this->relDirection; }
    70   void setRelDir (Quaternion* relDir);
    71   void setRelDir (Quaternion relDir);
     67  //void setRelDir (Quaternion* relDir);
     68  void setRelDir (const Quaternion& relDir);
    7269  inline Quaternion getAbsDir () const { return *this->absDirection; }
    73   void setAbsDir (Quaternion* absDir);
    74   void setAbsDir (Quaternion absDir);
     70  //void setAbsDir (Quaternion* absDir);
     71  void setAbsDir (const Quaternion& absDir);
     72  //void shiftDir (Quaternion* shift);
    7573  void shiftDir (const Quaternion& shift);
    76   void shiftDir (Quaternion shift);
    7774
    7875  float getSpeed() const;
  • orxonox/trunk/src/story_entities/world.cc

    r3809 r3810  
    464464            WorldEntity* baseNode = new Satellite(Vector(1,0,1), 1.2);
    465465            this->localPlayer->addChild(baseNode);
    466             baseNode->setRelCoor(new Vector(10.0, 2.0, 1.0));
     466            baseNode->setRelCoor(Vector(10.0, 2.0, 1.0));
    467467            this->spawn(baseNode);
    468468
    469469            WorldEntity* secondNode = new Satellite(Vector(0,0,1), 2.0);
    470470            baseNode->addChild(secondNode);
    471             secondNode->setRelCoor(new Vector(0.0, 0.0, 3.0));
     471            secondNode->setRelCoor(Vector(0.0, 0.0, 3.0));
    472472            this->spawn(secondNode);
    473473
     
    475475            WorldEntity* thirdNode = new Satellite(Vector(0,0,1), 1.0);
    476476            secondNode->addChild(thirdNode);
    477             thirdNode->setRelCoor(new Vector(2.0, 0.0, 0.0));
     477            thirdNode->setRelCoor(Vector(2.0, 0.0, 0.0));
    478478            this->spawn(thirdNode);
    479479
     
    483483            WorldEntity* b = new Environment();
    484484            this->localPlayer->addChild(b);
    485             b->setRelCoor(new Vector(10.0, 1.0, 1.0));
     485            b->setRelCoor(Vector(10.0, 1.0, 1.0));
    486486            this->spawn(b);
    487487
     
    489489            WorldEntity* c = new Environment();
    490490            this->localPlayer->addChild(c);
    491             c->setRelCoor(new Vector(10.0, 2.0, -1.0));
     491            c->setRelCoor(Vector(10.0, 2.0, -1.0));
    492492            this->spawn(c);
    493493           
     
    576576
    577577  terrain = new Terrain("../data/worlds/newGround.obj");
    578   terrain->setRelCoor(new Vector(0,-10,0));
     578  terrain->setRelCoor(Vector(0,-10,0));
    579579  this->spawn(terrain);
    580580
  • orxonox/trunk/src/world_entities/weapon.cc

    r3752 r3810  
    3838{
    3939  parent->addChild(this, PNODE_ALL);
    40   this->setRelCoor(coordinate);
    41   this->setRelDir(direction);
     40  this->setRelCoor(*coordinate);
     41  this->setRelDir(*direction);
    4242  WorldInterface* wi = WorldInterface::getInstance();
    4343  this->worldEntities = wi->getEntityList();
Note: See TracChangeset for help on using the changeset viewer.