class: etk::template<T> Vector3D


Description:



Synopsis:

+ T             m_floats;
+ Vector3D ();
+ Vector3D (const T & _x,
const T & _y,
const T & _z);
+ Vector3D<T> & operator += (const Vector3D<T> & _v);
+ Vector3D<T> operator + (const Vector3D<T> & _v);
+ Vector3D<T> & operator -= (const Vector3D<T> & _v);
+ Vector3D<T> operator - (const Vector3D<T> & _v);
+ Vector3D<T> & operator *= (const T & _s);
+ Vector3D<T> operator * (const T & _s);
+ Vector3D<T> & operator = (const Vector3D<T> & _s);
+ Vector3D<T> & operator = (const T & _s);
+ btScalar dot (const Vector3D<T> & _v) const;
+ btScalar length2 () const;
+ btScalar length () const;
+ btScalar distance2 (const btVector3 & _v) const;
+ btScalar distance (const btVector3 & _v) const;
+ Vector3D<T> & safeNormalize ();
+ Vector3D<T> & normalize ();
+ Vector3D<T> normalized () const;
+ Vector3D<T> rotate (const Vector3D<T> & _wAxis,
const btScalar _angle) const;
+ btScalar angle (const Vector3D<T> & _v) const;
+ Vector3D<T> absolute () const;
+ Vector3D<T> cross (const Vector3D<T> & _v) const;
+ T triple (const Vector3D<T> & _v1,
const Vector3D<T> & _v2) const;
+ int32_t minAxis () const;
+ int32_t maxAxis () const;
+ int32_t furthestAxis () const;
+ int32_t closestAxis () const;
+ void setInterpolate3 (const Vector3D<T> & _v0,
const Vector3D<T> & _v1,
T _rt);
+ Vector3D<T> lerp (const Vector3D<T> & _v,
const btScalar & _t) const;
+ Vector3D<T> & operator *= (const Vector3D<T> & _v);
+ Vector3D<T> operator * (const Vector3D<T> & _v);
+ const T & getX () const;
+ const T & getY () const;
+ const T & getZ () 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 Vector3D<T> & _other) const;
+ bool operator != (const Vector3D<T> & _other) const;
+ void setMax (const Vector3D<T> & _other);
+ void setMin (const Vector3D<T> & _other);
+ void setValue (const T & _x,
const T & _y,
const T & _z);
+ void getSkewSymmetricMatrix (Vector3D<T>* _v0,
Vector3D<T>* _v1,
Vector3D<T>* _v2) const;
+ void setZero ();
+ bool isZero () const;

Detail:

m_floats

+ T m_floats;



Vector3D

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


Vector3D

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


operator +=

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


operator -=

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


operator *=

+ Vector3D<T> & operator *= (const T & _s);
+ Vector3D<T> operator * (const T & _s);
Scale the vector


operator =

+ Vector3D<T> & operator = (const Vector3D<T> & _s);
+ Vector3D<T> & operator = (const T & _s);
Inversely scale the vector


dot

+ btScalar dot (const Vector3D<T> & _v) const;
Return the dot product


length2

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


length

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


distance2

+ btScalar distance2 (const btVector3 & _v) const;
Return the distance squared between the ends of this and another vector This is symantically treating the vector like a point


distance

+ btScalar distance (const btVector3 & _v) const;
Return the distance between the ends of this and another vector This is symantically treating the vector like a point


safeNormalize

+ Vector3D<T> & safeNormalize ();



normalize

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


normalized

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


rotate

+ Vector3D<T> rotate (const Vector3D<T> & _wAxis,
const btScalar _angle) const;
Return a rotated version of this vector


angle

+ btScalar angle (const Vector3D<T> & _v) const;
Return the angle between this and another vector


absolute

+ Vector3D<T> absolute () const;
Return a vector will the absolute values of each element


cross

+ Vector3D<T> cross (const Vector3D<T> & _v) const;
Return the cross product between this and another vector


triple

+ T triple (const Vector3D<T> & _v1,
const Vector3D<T> & _v2) const;



minAxis

+ int32_t minAxis () const;
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z


maxAxis

+ int32_t maxAxis () const;
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z


furthestAxis

+ int32_t furthestAxis () const;



closestAxis

+ int32_t closestAxis () const;



setInterpolate3

+ void setInterpolate3 (const Vector3D<T> & _v0,
const Vector3D<T> & _v1,
T _rt);



lerp

+ Vector3D<T> lerp (const Vector3D<T> & _v,
const btScalar & _t) const;
Return the linear interpolation between this and another vector


operator *=

+ Vector3D<T> & operator *= (const Vector3D<T> & _v);
+ Vector3D<T> operator * (const Vector3D<T> & _v);
Elementwise multiply this vector by the other


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


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 * () const;



operator ==

+ bool operator == (const Vector3D<T> & _other) const;



operator !=

+ bool operator != (const Vector3D<T> & _other) const;



setMax

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


setMin

+ void setMin (const Vector3D<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);



getSkewSymmetricMatrix

+ void getSkewSymmetricMatrix (Vector3D<T>* _v0,
Vector3D<T>* _v1,
Vector3D<T>* _v2) const;



setZero

+ void setZero ();



isZero

+ bool isZero () const;