class: etk::Vector3D


Description:



Constructor and Destructor:

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

Synopsis:

+ T             m_floats;
+ 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 (void ) const;
+ Vector3D<T> cross (const Vector3D<T> & v) const;
+ T triple (const Vector3D<T> & v1,
const Vector3D<T> & v2) const;
+ int32_t minAxis (void ) const;
+ int32_t maxAxis (void ) const;
+ int32_t furthestAxis (void ) const;
+ int32_t closestAxis (void ) 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 (void );
+ bool isZero (void ) const;

Detail:

m_floats

+ T m_floats;



Vector3D

+  Vector3D (void );
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);
Add a vector to this one


operator +

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



operator -=

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


operator -

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



operator *=

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


operator *

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



operator =

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


operator =

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



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 (void ) 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 (void ) const;
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z


maxAxis

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


furthestAxis

+ int32_t furthestAxis (void ) const;



closestAxis

+ int32_t closestAxis (void ) 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);
Elementwise multiply this vector by the other


operator *

+ Vector3D<T> operator * (const Vector3D<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


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 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 (void );



isZero

+ bool isZero (void ) const;