Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 12, 2005, 11:37:57 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: obb subdivision algorithm started, some modifications in the vector class to support additions with sVec3D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/math/vector.h

    r4585 r4609  
    3131  /**  \param v The vector to add \returns the addition between two vectors (this + v) */
    3232  inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); };
     33  /**  \param v The vector to add \returns the addition between two vectors (this + v) */
     34  inline Vector operator+ (const sVec3D& v) const { return Vector(x + v[0], y + v[1], z + v[2]); };
    3335  /** \param v The vector to add  \returns the addition between two vectors (this += v) */
    3436  inline const Vector& operator+= (const Vector& v) { this->x += v.x; this->y += v.y; this->z += v.z; return *this; };
    3537  /** \param v The vector to substract  \returns the substraction between two vectors (this - v) */
     38  inline const Vector& operator+= (const sVec3D& v) { this->x += v[0]; this->y += v[1]; this->z += v[2]; return *this; };
     39  /** \param v The vector to substract  \returns the substraction between two vectors (this - v) */
    3640  inline Vector operator- (const Vector& v) const { return Vector(x - v.x, y - v.y, z - v.z); }
     41  /** \param v The vector to substract  \returns the substraction between two vectors (this - v) */
     42  inline Vector operator- (const sVec3D& v) const { return Vector(x - v[0], y - v[1], z - v[2]); }
    3743  /** \param v The vector to substract  \returns the substraction between two vectors (this -= v) */
    3844  inline const Vector& operator-= (const Vector& v) { this->x -= v.x; this->y -= v.y; this->z -= v.z; return *this; };
     45  /** \param v The vector to substract  \returns the substraction between two vectors (this -= v) */
     46  inline const Vector& operator-= (const sVec3D& v) { this->x -= v[0]; this->y -= v[1]; this->z -= v[2]; return *this; };
    3947  /** \param v the second vector  \returns The dotProduct between two vector (this (dot) v) */
    4048  inline float operator* (const Vector& v) const { return x * v.x + y * v.y + z * v.z; };
Note: See TracChangeset for help on using the changeset viewer.