Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jan 24, 2007, 12:45:39 AM (18 years ago)
Author:
patrick
Message:

merged branche mount_point to trunk. this will add mount point abilities, bsp transparency fix and some other smaller stuff to this trunk

File:
1 edited

Legend:

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

    r9110 r10314  
    4747  /** @param v: the Vecor to compare with this one @returns true, if the Vecors are different, false otherwise */
    4848  inline bool operator!= (const Vector& v) const { return (this->x!=v.x||this->y!=v.y||this->z!=v.z)?true:false; };
     49  inline bool operator> (const Vector& v) const  { return (this->len() > v.len()); }
     50  inline bool operator< (const Vector& v) const  { return (this->len() < v.len()); }
     51
    4952  /** @param index The index of the "array" @returns the x/y/z coordinate */
    5053  inline float operator[] (float index) const {if( index == 0) return this->x; if( index == 1) return this->y; if( index == 2) return this->z; }
     
    8285  inline const Vector& operator= (const sVec3D& v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; }
    8386  inline const Vector& operator= (const float* v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; }
     87
     88  /** this operator can be used to assign values to the vector */
     89  inline void operator() (float x, float y, float z) { this->x = x; this->y = y; this->z = z;}
     90
     91
     92
     93
    8494  /** @param v: the other vector \return the dot product of the vectors */
    8595  float dot (const Vector& v) const { return x*v.x+y*v.y+z*v.z; };
Note: See TracChangeset for help on using the changeset viewer.