Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 13, 2005, 11:16:33 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/physics: merged the Trunk into the physics Branche again:
merged with command:
svn merge ../trunk physics -r 3953:HEAD
no important conflicts

Location:
orxonox/branches/physics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics

    • Property svn:externals
      •  

        old new  
        1 data http://svn.orxonox.ethz.ch/data
         1
  • orxonox/branches/physics/src/lib/coord/p_node.h

    r3813 r4178  
    5757
    5858
    59   inline Vector* getRelCoor () const { return this->relCoordinate; }
     59  inline const Vector& getRelCoor () const { return this->relCoordinate; }
    6060  void setRelCoor (const Vector& relCoord);
    61   inline Vector getAbsCoor () const { return *this->absCoordinate; }
     61  inline const Vector& getAbsCoor () const { return this->absCoordinate; }
    6262  void setAbsCoor (const Vector& absCoord);
    6363  void shiftCoor (const Vector& shift);
    6464
    65   inline Quaternion getRelDir () const { return *this->relDirection; }
     65  inline const Quaternion& getRelDir () const { return this->relDirection; }
    6666  void setRelDir (const Quaternion& relDir);
    67   inline Quaternion getAbsDir () const { return *this->absDirection; }
     67  inline const Quaternion& getAbsDir () const { return this->absDirection; }
    6868  void setAbsDir (const Quaternion& absDir);
    6969  void shiftDir (const Quaternion& shift);
    7070
    71   float getSpeed() const;
     71  /** \returns the Speed of the Node */
     72  inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000
     73  /** \returns the Velocity of the Node */
     74  inline const Vector& getVelocity() const {return this->velocity;}
    7275
    7376  void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);
     
    8588  void processTick (float dt);
    8689
    87   void setName (char* newName);
    88   char* getName ();
     90  void setName (const char* newName);
     91  const char* getName ();
    8992
    9093
     
    99102  bool bRelDirChanged;     //!< If Relative Direction has changed since last time we checked
    100103
    101   Vector* relCoordinate;    //!< coordinates relative to the parent
    102   Vector* absCoordinate;    //!< absolute coordinates in the world ( from (0,0,0) )
    103   Quaternion* relDirection; //!< direction relative to the parent
    104   Quaternion* absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
     104  Vector relCoordinate;    //!< coordinates relative to the parent
     105  Vector absCoordinate;    //!< absolute coordinates in the world ( from (0,0,0) )
     106  Quaternion relDirection; //!< direction relative to the parent
     107  Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
    105108
    106109  int mode;                //!< the mode of the binding
     
    109112  void init(PNode* parent);
    110113
    111   Vector* lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate
    112   Vector* diffCoordinate;    //!< this is stored here for performance reasons, difference to the last vector
    113   float time;                //!< time since last update
     114  Vector velocity;          //!< Saves the velocity.
     115  Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate
    114116};
    115117
Note: See TracChangeset for help on using the changeset viewer.