Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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/lib
Files:
5 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);
Note: See TracChangeset for help on using the changeset viewer.