Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5910 in orxonox.OLD for branches/spaceshipcontrol/src/lib/coord


Ignore:
Timestamp:
Dec 4, 2005, 2:19:19 PM (19 years ago)
Author:
bensch
Message:

controll: ability to get the directions of Nodes (absolute direction to Directional Vectors X,Y,Z)

Location:
branches/spaceshipcontrol/src/lib/coord
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/lib/coord/p_node.cc

    r5819 r5910  
    836836        glEnd();
    837837      }
     838
    838839      /* if we want to draw the children too */
    839840      if (depth == 0) /* -> all of them */
  • branches/spaceshipcontrol/src/lib/coord/p_node.h

    r5770 r5910  
    7676  inline const Vector& getRelCoor () const { return this->prevRelCoordinate; };
    7777  /** @returns the Relative Coordinate Destination */
    78   inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)?*this->toCoordinate:this->relCoordinate; };
     78  inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)? *this->toCoordinate : this->relCoordinate; };
    7979  void setAbsCoor (const Vector& absCoord);
    8080  void setAbsCoor (float x, float y, float z);
     
    9393  inline const Quaternion& getRelDir () const { return this->prevRelDirection; };
    9494  /** @returns the Relative Directional Destination */
    95   inline const Quaternion& getRelDirSoft2D() const { return (this->toDirection)?*this->toDirection:this->relDirection; };
     95  inline const Quaternion& getRelDirSoft2D() const { return (this->toDirection)? *this->toDirection : this->relDirection; };
    9696  /** @returns a Vector pointing into the relative Direction */
    9797  inline Vector getRelDirV() const { return this->prevRelDirection.apply(Vector(0,1,0)); };
     
    100100  void setAbsDirSoft(const Quaternion& absDirSoft, float bias = 1.0);
    101101  void setAbsDirSoft(float x, float y, float z, float bias = 1.0);
     102  void shiftDir (const Quaternion& shift);
    102103  /** @returns the absolute Direction */
    103104  inline const Quaternion& getAbsDir () const { return this->absDirection; };
    104105  /** @returns a Vector pointing into the absolute Direction */
    105106  inline Vector getAbsDirV() const { return this->absDirection.apply(Vector(0,1,0)); };
    106   void shiftDir (const Quaternion& shift);
     107  /** @returns A Vector pointing into the forward direction (X) of the Node */
     108  inline Vector getAbsDirX() const { return this->absDirection.apply(Vector(1,0,0)); };
     109  /** @returns A Vector pointing into the upward direction (Y) of the Node */
     110  inline Vector getAbsDirY() const { return this->absDirection.apply(Vector(0,1,0)); };
     111  /** @returns A Vector pointing into the right direction (Z) of the Node */
     112  inline Vector getAbsDirZ() const { return this->absDirection.apply(Vector(0,0,1)); };
    107113
    108114  /** @returns the Speed of the Node */
Note: See TracChangeset for help on using the changeset viewer.