Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8035 in orxonox.OLD for trunk/src/lib/math


Ignore:
Timestamp:
May 31, 2006, 4:20:51 PM (19 years ago)
Author:
bensch
Message:

gui: merged the gui back to the trunk

Location:
trunk/src/lib/math
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/math/rect2D.h

    r7919 r8035  
    8383  inline void setRight(float right) { _bottomRight.x = right; };
    8484  /** @param topLeft the top left corner of the Rectangle */
    85   void setTopLeft(const Vector2D& topLeft) { _topLeft = topLeft; };
     85  inline void setTopLeft(const Vector2D& topLeft) { _topLeft = topLeft; };
     86  /** @param x the left border of the Rectangle @param y the top border */
     87  inline void setTopLeft(float x, float y) { this->setTopLeft(Vector2D(x,y)); };
    8688  /** @param bottomRight the lower right corner of the Rectangle */
    87   void setBottomRight(const Vector2D& bottomRight) { _bottomRight = bottomRight; };
     89  inline void setBottomRight(const Vector2D& bottomRight) { _bottomRight = bottomRight; };
     90  /** @param x the right border of the Rectangle @param y the bottom border */
     91  inline void setBottomRight(float x, float y) { this->setBottomRight(Vector2D(x,y)); };
    8892
    8993  void setWidth(float width);
  • trunk/src/lib/math/vector.h

    r7711 r8035  
    3232//! this is a small and performant 3D vector
    3333typedef float sVec3D[3];
    34 
    35 
    36 //! small and performant 2D vector
    37 typedef float sVec2D[2];
    38 
    3934
    4035
     
    10196  inline void slerpTo(const Vector& toVec, float t) { *this + (toVec - *this) * t; };
    10297
     98  /** @returns a Null Vector */
     99  inline static const Vector& nullVector() { static Vector nullVector; return nullVector; }
    103100  void debug() const;
    104101
  • trunk/src/lib/math/vector2D.h

    r7919 r8035  
    9393  void slerp(const Vector2D& v, float val) { *this += (*this - v) * val; }
    9494
     95  /** @returns a Vector of (0,0) */
     96  static const Vector2D& nullVector() { static Vector2D nullVector; return nullVector; };
     97
    9598  void debug() const;
    9699
Note: See TracChangeset for help on using the changeset viewer.