Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4771 in orxonox.OLD


Ignore:
Timestamp:
Jul 2, 2005, 1:33:32 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: PNode loading complete

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

Legend:

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

    r4765 r4771  
    120120  static_cast<BaseObject*>(this)->loadParams(root);
    121121
     122  LoadParam<PNode>(root, "rel-coor", this, &PNode::setRelCoor)
     123      .describe("Sets The relative position of the Node to its parent.");
     124
    122125  LoadParam<PNode>(root, "abs-coor", this, &PNode::setAbsCoor)
    123126      .describe("Sets The absolute Position of the Node.");
    124127
    125   LoadParam<PNode>(root, "rel-coor", this, &PNode::setRelCoor)
    126       .describe("Sets The relative position of the Node to its parent.");
     128  LoadParam<PNode>(root, "rel-dir", this, &PNode::setRelDir)
     129      .describe("Sets The relative rotation of the Node to its parent.");
     130
     131  LoadParam<PNode>(root, "abs-dir", this, &PNode::setAbsDir)
     132      .describe("Sets The absolute rotation of the Node.");
    127133
    128134  LoadParam<PNode>(root, "parent", this, &PNode::setParent)
     
    242248
    243249/**
     250 * @see void PNode::setRelDir (const Quaternion& relDir)
     251 * @param x the x direction
     252 * @param y the y direction
     253 * @param z the z direction
     254 *
     255 * main difference is, that here you give a directional vector, that will be translated into a Quaternion
     256 */
     257void PNode::setRelDir (float x, float y, float z)
     258{
     259  this->setRelDir(Quaternion(Vector(x,y,z), Vector(0,1,0)));
     260}
     261
     262/**
    244263   \brief sets the absolute direction (0,0,1)
    245264   \param absDir absolute coordinates
     
    253272  this->bAbsDirChanged = true;
    254273  this->absDirection = absDir;
     274}
     275
     276/**
     277 * @see void PNode::setAbsDir (const Quaternion& relDir)
     278 * @param x the x direction
     279 * @param y the y direction
     280 * @param z the z direction
     281 *
     282 * main difference is, that here you give a directional vector, that will be translated into a Quaternion
     283 */
     284void PNode::setAbsDir (float x, float y, float z)
     285{
     286  this->setAbsDir(Quaternion(Vector(x,y,z), Vector(0,1,0)));
    255287}
    256288
  • orxonox/trunk/src/lib/coord/p_node.h

    r4765 r4771  
    7171
    7272  void setRelDir (const Quaternion& relDir);
     73  void setRelDir (float x, float y, float z);
    7374  /** \returns the relative Direction */
    7475  inline const Quaternion& getRelDir () const { return this->relDirection; };
     
    7677  inline Vector getRelDirV() const { return this->relDirection.apply(Vector(0,1,0)); };
    7778  void setAbsDir (const Quaternion& absDir);
     79  void setAbsDir (float x, float y, float z);
    7880  /** \returns the absolute Direction */
    7981  inline const Quaternion& getAbsDir () const { return this->absDirection; };
Note: See TracChangeset for help on using the changeset viewer.