Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4610 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 12, 2005, 11:48:07 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: 1. timestep different, now the game runs smoother on my laptop…. with this we have to play around some

  1. implemented PNode::abs-coor, rel-coor for loading
Location:
orxonox/trunk/src
Files:
3 edited

Legend:

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

    r4592 r4610  
    117117{
    118118  static_cast<BaseObject*>(this)->loadParams(root);
     119
     120  LoadParam<PNode>(root, "abs-coor", this, &PNode::setAbsCoor)
     121      .describe("Sets The absolute Position of the Node.");
     122
     123  LoadParam<PNode>(root, "rel-coor", this, &PNode::setRelCoor)
     124      .describe("Sets The relative position of the Node to its parent.");
    119125}
    120126
     
    134140
    135141/**
     142   \brief set relative coordinates
     143   \param x x-relative coordinates to its parent
     144   \param y y-relative coordinates to its parent
     145   \param z z-relative coordinates to its parent
     146   \see  void PNode::setRelCoor (const Vector& relCoord)
     147*/
     148void PNode::setRelCoor (float x, float y, float z)
     149{
     150  this->setRelCoor(Vector(x, y, z));
     151}
     152
     153/**
    136154   \param absCoord set absolute coordinate
    137155
     
    144162  this->bAbsCoorChanged = true;
    145163  this->absCoordinate = absCoord;
     164}
     165
     166/**
     167 * \param x x-coordinate.
     168 * \param y y-coordinate.
     169 * \param z z-coordinate.
     170 * \see void PNode::setAbsCoor (const Vector& absCoord)
     171 */
     172void PNode::setAbsCoor(float x, float y, float z)
     173{
     174  this->setAbsCoor(Vector(x, y, z));
    146175}
    147176
  • orxonox/trunk/src/lib/coord/p_node.h

    r4574 r4610  
    5656
    5757  void setRelCoor (const Vector& relCoord);
     58  void setRelCoor (float x, float y, float z);
    5859  /** \returns the relative position */
    5960  inline const Vector& getRelCoor () const { return this->relCoordinate; };
    6061  void setAbsCoor (const Vector& absCoord);
     62  void setAbsCoor (float x, float y, float z);
    6163  /** \returns the absolute position */
    6264  inline const Vector& getAbsCoor () const { return this->absCoordinate; };
  • orxonox/trunk/src/story_entities/world.cc

    r4608 r4610  
    10251025      this->dt = currentFrame - this->lastFrame;
    10261026
    1027       if( this->dt > 0)
     1027      if( this->dt > 10)
    10281028        {
    10291029          float fps = 1000/dt;
     
    10391039          */
    10401040          PRINTF(2)("fps = 1000 - frame rate is adjusted\n");
    1041           SDL_Delay(10);
     1041          SDL_Delay(10-dt);
    10421042          this->dt = 10;
    10431043        }
Note: See TracChangeset for help on using the changeset viewer.