Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Apr 13, 2005, 9:52:34 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: changing pnode interface to const arguments

Location:
orxonox/trunk/src
Files:
7 edited

Legend:

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

    r3669 r3809  
    4040   \todo this constructor is not jet implemented - do it
    4141*/
    42 NullParent::NullParent () : PNode (new Vector(0,0,0), NULL)
     42NullParent::NullParent () : PNode (Vector(0,0,0), NULL)
    4343{
    4444  PRINTF(4)("NullParent::NullParent() - making new NullParent, there can only be one..\n");
     
    4949
    5050
    51 NullParent::NullParent (Vector* absCoordinate) : PNode (new Vector(0,0,0), NULL)
     51NullParent::NullParent (const Vector& absCoordinate) : PNode (Vector(0,0,0), NULL)
    5252{
    5353  singletonRef = this;
    5454  this->parent = this;
    5555  this->mode = PNODE_ALL;
    56   *this->absCoordinate = *absCoordinate;
     56  *this->absCoordinate = absCoordinate;
    5757  this->setName("NullParent");
    5858}
  • orxonox/trunk/src/lib/coord/null_parent.h

    r3644 r3809  
    2323 private:
    2424  NullParent ();
    25   NullParent (Vector* absCoordinate);
     25  NullParent (const Vector& absCoordinate);
    2626  static NullParent* singletonRef;
    2727
  • orxonox/trunk/src/lib/coord/p_node.cc

    r3804 r3809  
    5555   \param parent The parent-node of this node.
    5656*/
    57 PNode::PNode (Vector* absCoordinate, PNode* parent )
     57PNode::PNode (const Vector& absCoordinate, PNode* parent )
    5858{
    5959  this->init(parent);
    6060
    61   *this->absCoordinate = *absCoordinate;
     61  *this->absCoordinate = absCoordinate;
    6262
    6363  __LIKELY_IF(parent != NULL)
     
    191191   has changed and won't update the children Nodes.
    192192*/
     193/*
    193194void PNode::setAbsCoor (Vector* absCoord)
    194195{
     
    196197  *this->absCoordinate = *absCoord;
    197198}
    198 
     199*/
    199200
    200201
     
    206207   has changed and won't update the children Nodes.
    207208*/
    208 void PNode::setAbsCoor (Vector absCoord)
     209void PNode::setAbsCoor (const Vector& absCoord)
    209210{
    210211  this->bAbsCoorChanged = true;
     
    269270
    270271*/
    271 void PNode::shiftCoor (Vector shift)
     272void PNode::shiftCoor (const Vector& shift)
    272273{
    273274
  • orxonox/trunk/src/lib/coord/p_node.h

    r3804 r3809  
    4949 public:
    5050  PNode ();
    51   PNode (Vector* absCoordinate, PNode* pNode);
     51  PNode (const Vector& absCoordinate, PNode* pNode);
    5252  virtual ~PNode ();
    5353
     
    6161  void setRelCoor (Vector relCoord);
    6262  inline Vector getAbsCoor () const { return *this->absCoordinate; }
    63   void setAbsCoor (Vector* absCoord);
    64   void setAbsCoor (Vector absCoord);
     63  //void setAbsCoor (Vector* absCoord);
     64  void setAbsCoor (const Vector& absCoord);
    6565  void shiftCoor (Vector* shift);
    66   void shiftCoor (Vector shift);
     66  void shiftCoor (const Vector& shift);
    6767  //void shiftCoor (Vector shift);
    6868
  • orxonox/trunk/src/lib/graphics/light.cc

    r3608 r3809  
    7070  this->lightPosition[3] = 0.0;
    7171
    72   this->setAbsCoor(&position);
     72  this->setAbsCoor(position);
    7373
    7474  glLightfv (lightsV[this->lightNumber], GL_POSITION, this->lightPosition);
  • orxonox/trunk/src/story_entities/world.cc

    r3808 r3809  
    771771  PRINTF(2)("debug() - starting debug\n");
    772772  PNode* p1 = NullParent::getInstance ();
    773   PNode* p2 = new PNode (new Vector(2, 2, 2), p1);
    774   PNode* p3 = new PNode (new Vector(4, 4, 4), p1);
    775   PNode* p4 = new PNode (new Vector(6, 6, 6), p2);
     773  PNode* p2 = new PNode (Vector(2, 2, 2), p1);
     774  PNode* p3 = new PNode (Vector(4, 4, 4), p1);
     775  PNode* p4 = new PNode (Vector(6, 6, 6), p2);
    776776
    777777  p1->debug ();
     
    780780  p4->debug ();
    781781
    782   p1->shiftCoor (new Vector(-1, -1, -1));
     782  p1->shiftCoor (Vector(-1, -1, -1));
    783783
    784784  printf("World::debug() - shift\n");
     
    796796  p4->debug ();
    797797
    798   p2->shiftCoor (new Vector(-1, -1, -1));
     798  p2->shiftCoor (Vector(-1, -1, -1));
    799799  p1->update (0);
    800800
     
    804804  p4->debug ();
    805805
    806   p2->setAbsCoor (new Vector(1,2,3));
     806  p2->setAbsCoor (Vector(1,2,3));
    807807
    808808
     
    10081008  this->entities->add (entity);
    10091009
    1010   entity->setAbsCoor (absCoor);
    1011   entity->setAbsDir (absDir);
     1010  entity->setAbsCoor (*absCoor);
     1011  entity->setAbsDir (*absDir);
    10121012
    10131013  entity->postSpawn ();
     
    10311031      parentNode->addChild (entity);
    10321032     
    1033       entity->setRelCoor (relCoor);
    1034       entity->setRelDir (relDir);
     1033      entity->setRelCoor (*relCoor);
     1034      entity->setRelDir (*relDir);
    10351035      entity->setMode(parentingMode);
    10361036     
  • orxonox/trunk/src/track_manager.cc

    r3710 r3809  
    811811      quat = quat * q;
    812812
    813       this->bindSlave->setAbsCoor(&tmp);
    814       this->bindSlave->setAbsDir(&quat);
     813      this->bindSlave->setAbsCoor(tmp);
     814      this->bindSlave->setAbsDir(quat);
    815815    }
    816816}
Note: See TracChangeset for help on using the changeset viewer.