Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3675 in orxonox.OLD for orxonox/trunk/src/lib/coord


Ignore:
Timestamp:
Mar 30, 2005, 5:20:21 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: glmenu progressbar corrected, pnode modifications

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

Legend:

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

    r3669 r3675  
    142142   \brief get relative coordinates
    143143   \returns relative coordinates to its parent
    144 */
    145 Vector PNode::getRelCoor ()
    146 {
    147   Vector r = *this->relCoordinate; /* return a copy, so it can't be modified */
    148   return r;
     144   
     145   the reference that is returned is a pointer to the real relCoor, so don't
     146   change it unless you realy know what you are doing.
     147*/
     148Vector* PNode::getRelCoor ()
     149{
     150  //Vector r = *this->relCoordinate; /* return a copy, so it can't be modified */
     151  return this->relCoordinate;
    149152}
    150153
     
    166169
    167170/**
     171   \brief set relative coordinates
     172   \param relCoord relative coordinates to its parent
     173
     174   it is very importand, that you use this function, if you want to update the
     175   relCoordinates. If you don't use this, the PNode won't recognize, that something
     176   has changed and won't update the children Nodes.
     177*/
     178void PNode::setRelCoor (Vector relCoord)
     179{
     180  this->bRelCoorChanged = true;
     181  *this->relCoordinate = relCoord;
     182}
     183
     184
     185/**
    168186   \brief get absolute coordinates
    169187   \returns absolute coordinates from (0,0,0)
     
    186204  this->bAbsCoorChanged = true;
    187205  *this->absCoordinate = *absCoord;
     206}
     207
     208
     209
     210/**
     211   \param absCoord set absolute coordinate
     212
     213   it is very importand, that you use this function, if you want to update the
     214   absCoordinates. If you don't use this, the PNode won't recognize, that something
     215   has changed and won't update the children Nodes.
     216*/
     217void PNode::setAbsCoor (Vector absCoord)
     218{
     219  this->bAbsCoorChanged = true;
     220  *this->absCoordinate = absCoord;
    188221}
    189222
     
    249282
    250283
     284void PNode::setRelDir (Quaternion relDir)
     285{
     286  this->bRelCoorChanged = true;
     287  *this->relDirection = relDir;
     288}
     289
     290
    251291/**
    252292   \brief gets the absolute direction (0,0,1)
     
    272312  *this->absDirection = *absDir;
    273313}
     314
     315
     316
     317/**
     318   \brief sets the absolute direction (0,0,1)
     319   \param absDir absolute coordinates
     320
     321   it is very importand, that you use this function, if you want to update the
     322   absDirection. If you don't use this, the PNode won't recognize, that something
     323   has changed and won't update the children Nodes.
     324*/
     325void PNode::setAbsDir (Quaternion absDir)
     326{
     327  this->bAbsDirChanged = true;
     328  *this->absDirection = absDir;
     329}
     330
    274331
    275332
  • orxonox/trunk/src/lib/coord/p_node.h

    r3644 r3675  
    5757
    5858
    59   Vector getRelCoor ();
     59  Vector* getRelCoor ();
    6060  void setRelCoor (Vector* relCoord);
    61   //void setRelCoor (Vector relCoord);
     61  void setRelCoor (Vector relCoord);
    6262  Vector getAbsCoor ();
    6363  void setAbsCoor (Vector* absCoord);
    64   //void setAbsCoor (Vector absCoord);
     64  void setAbsCoor (Vector absCoord);
    6565  void shiftCoor (Vector* shift);
    6666  //void shiftCoor (Vector shift);
     
    6868  Quaternion getRelDir ();
    6969  void setRelDir (Quaternion* relDir);
     70  void setRelDir (Quaternion relDir);
    7071  Quaternion getAbsDir ();
    7172  void setAbsDir (Quaternion* absDir);
     73  void setAbsDir (Quaternion absDir);
    7274  void shiftDir (Quaternion* shift);
    7375
Note: See TracChangeset for help on using the changeset viewer.