class: etk::template<T> Vector4D


Description:



Synopsis:

+ T             m_floats;
+ Vector4D ();
+ Vector4D (const T & _x,
const T & _y,
const T & _z,
const T & _w);
+ Vector4D<T> & operator += (const Vector4D<T> & v);
+ Vector4D<T> operator + (const Vector4D<T> & v);
+ Vector4D<T> & operator -= (const Vector4D<T> & v);
+ Vector4D<T> operator - (const Vector4D<T> & v);
+ Vector4D<T> & operator *= (const T & s);
+ Vector4D<T> operator * (const T & s);
+ Vector4D<T> & operator = (const Vector4D<T> & s);
+ Vector4D<T> & operator = (const T & s);
+ float dot (const Vector4D<T> & v) const;
+ float length2 () const;
+ float length () const;
+ float distance2 (const Vector4D<T> & v) const;
+ float distance (const Vector4D<T> & v) const;
+ Vector4D<T> & normalize ();
+ Vector4D<T> normalized () const;
+ Vector4D<T> absolute () const;
+ Vector4D<T> & operator *= (const Vector4D<T> & v);
+ Vector4D<T> operator * (const Vector4D<T> & v);
+ const T & getX () const;
+ const T & getY () const;
+ const T & getZ () const;
+ const T & getW () const;
+ void setX (T _x);
+ void setY (T _y);
+ void setZ (T _z);
+ void setW (T _w);
+ const T & x () const;
+ const T & y () const;
+ const T & z () const;
+ const T & w () const;
+ operator T * ();
+ operator const T * () const;
+ bool operator == (const Vector4D<T> & other) const;
+ bool operator != (const Vector4D<T> & other) const;
+ void setMax (const Vector4D<T> & other);
+ void setMin (const Vector4D<T> & other);
+ void setValue (const T & _x,
const T & _y,
const T & _z,
const T & _w);
+ void setZero ();
+ bool isZero () const;

Detail:

m_floats

+ T m_floats;



Vector4D

+  Vector4D ();
No initialization constructor (faster ...)


Vector4D

+  Vector4D (const T & _x,
const T & _y,
const T & _z,
const T & _w);
Constructor from scalars


operator +=

+ Vector4D<T> & operator += (const Vector4D<T> & v);
Add a vector to this one


operator +

+ Vector4D<T> operator + (const Vector4D<T> & v);



operator -=

+ Vector4D<T> & operator -= (const Vector4D<T> & v);
Subtract a vector from this one


operator -

+ Vector4D<T> operator - (const Vector4D<T> & v);



operator *=

+ Vector4D<T> & operator *= (const T & s);
Scale the vector


operator *

+ Vector4D<T> operator * (const T & s);



operator =

+ Vector4D<T> & operator = (const Vector4D<T> & s);
Inversely scale the vector


operator =

+ Vector4D<T> & operator = (const T & s);



dot

+ float dot (const Vector4D<T> & v) const;
Return the dot product


length2

+ float length2 () const;
Return the length of the vector squared


length

+ float length () const;
Return the length of the vector


distance2

+ float distance2 (const Vector4D<T> & v) const;
Return the distance squared between the ends of this and another vector This is symantically treating the vector like a point


distance

+ float distance (const Vector4D<T> & v) const;
Return the distance between the ends of this and another vector This is symantically treating the vector like a point


normalize

+ Vector4D<T> & normalize ();
Normalize this vector x^2 + y^2 + z^2 = 1


normalized

+ Vector4D<T> normalized () const;
Return a normalized version of this vector


absolute

+ Vector4D<T> absolute () const;
Return a rotated version of this vector
Return the angle between this and another vector
Return a vector will the absolute values of each element


operator *=

+ Vector4D<T> & operator *= (const Vector4D<T> & v);
Return the cross product between this and another vector
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z
Return the linear interpolation between this and another vector
Elementwise multiply this vector by the other


operator *

+ Vector4D<T> operator * (const Vector4D<T> & v);



getX

+ const T & getX () const;
Return the x value


getY

+ const T & getY () const;
Return the y value


getZ

+ const T & getZ () const;
Return the z value


getW

+ const T & getW () const;
Return the z value


setX

+ void setX (T _x);
Set the x value


setY

+ void setY (T _y);
Set the y value


setZ

+ void setZ (T _z);
Set the z value


setW

+ void setW (T _w);
Set the w value


x

+ const T & x () const;
Return the x value


y

+ const T & y () const;
Return the y value


z

+ const T & z () const;
Return the z value


w

+ const T & w () const;
Return the w value


operator T *

+  operator T * ();



operator const T *

+  operator const T * () const;



operator ==

+ bool operator == (const Vector4D<T> & other) const;



operator !=

+ bool operator != (const Vector4D<T> & other) const;



setMax

+ void setMax (const Vector4D<T> & other);
Set each element to the max of the current values and the values of another btVector3


setMin

+ void setMin (const Vector4D<T> & other);
Set each element to the min of the current values and the values of another btVector3


setValue

+ void setValue (const T & _x,
const T & _y,
const T & _z,
const T & _w);



setZero

+ void setZero ();



isZero

+ bool isZero () const;