vector3d Class Template Reference

#include <vector3d.h>

template<class T>
class irr::core::vector3d< T >

Public Member Functions

Data Fields


Constructor & Destructor Documentation

vector3d (  )  [inline]

vector3d ( nx,
ny,
nz 
) [inline]

vector3d ( const vector3d< T > &  other  )  [inline]


Member Function Documentation

vector3d<T> crossProduct ( const vector3d< T > &  other  )  const [inline]

Calculates the cross product with another vector

Parameters:
other,: Other vector to get the cross product against.

T dotProduct ( const vector3d< T > &  other  )  const [inline]

bool equals ( const vector3d< T > &  other  )  [inline]

void getAs4Values ( T *  array  )  [inline]

Useful for setting in shader constants for example. The fourth value will always be 0.

f64 getDistanceFrom ( const vector3d< T > &  other  )  const [inline]

Here, the vector is interpreted as point in 3 dimensional space.

f32 getDistanceFromSQ ( const vector3d< T > &  other  )  const [inline]

Here, the vector is interpreted as a point in 3 dimensional space.

vector3d<T> getHorizontalAngle (  )  [inline]

Thanks to Arras on the Irrlicht forums to add this method.

Returns:
A vector representing the rotation in degrees of this vector. The Z component of the vector will always be 0.

vector3d<T> getInterpolated ( const vector3d< T > &  other,
f32  d 
) const [inline]

Returns interpolated vector.

Parameters:
other,: other vector to interpolate between
d,: value between 0.0f and 1.0f.

f64 getLength (  )  const [inline]

f64 getLengthSQ (  )  const [inline]

This is useful because it is much faster then getLength().

void invert (  )  [inline]

bool isBetweenPoints ( const vector3d< T > &  begin,
const vector3d< T > &  end 
) const [inline]

Returns if this vector interpreted as a point is on a line between two other points. It is assumed that the point is on the line.

Parameters:
begin,: Begin point to check between.
end,: End point to check between.

vector3d<T>& normalize (  )  [inline]

vector3d<T> operator * ( const T  v  )  const [inline]

vector3d<T> operator * ( const vector3d< T > &  other  )  const [inline]

vector3d<T>& operator *= ( const T  v  )  [inline]

vector3d<T>& operator *= ( const vector3d< T > &  other  )  [inline]

bool operator!= ( const vector3d< T > &  other  )  const [inline]

vector3d<T> operator+ ( const vector3d< T > &  other  )  const [inline]

vector3d<T>& operator+= ( const vector3d< T > &  other  )  [inline]

vector3d<T> operator- ( const vector3d< T > &  other  )  const [inline]

vector3d<T> operator- (  )  const [inline]

vector3d<T>& operator-= ( const vector3d< T > &  other  )  [inline]

vector3d<T> operator/ ( const T  v  )  const [inline]

vector3d<T> operator/ ( const vector3d< T > &  other  )  const [inline]

vector3d<T>& operator/= ( const T  v  )  [inline]

vector3d<T>& operator/= ( const vector3d< T > &  other  )  [inline]

bool operator<= ( const vector3d< T > &  other  )  const [inline]

vector3d<T>& operator= ( const vector3d< T > &  other  )  [inline]

bool operator== ( const vector3d< T > &  other  )  const [inline]

bool operator>= ( const vector3d< T > &  other  )  const [inline]

void rotateXYBy ( f64  degrees,
const vector3d< T > &  center 
) [inline]

Rotates the vector around the Z axis( which changes the X and Y values ).

Parameters:
degrees,: Degress to rotate the vector.
center,: Center of the rotation.

void rotateXZBy ( f64  degrees,
const vector3d< T > &  center 
) [inline]

Rotates the vector around the Y axis( which changes the X and Z values ).

Parameters:
degrees,: Degress to rotate the vector.
center,: Center of the rotation.

void rotateYZBy ( f64  degrees,
const vector3d< T > &  center 
) [inline]

Rotates the vector around the X axis( which changes the Y and Z values ).

Parameters:
degrees,: Degress to rotate the vector.
center,: Center of the rotation.

void set ( const vector3d< T > &  p  )  [inline]

void set ( const T  nx,
const T  ny,
const T  nz 
) [inline]

void setLength ( newlength  )  [inline]

Sets the lenght of the vector to a new value

Parameters:
newlength,: new length to set the vector to.


Field Documentation

T X

T Y

T Z


Generated on Fri Apr 27 14:47:02 2007 for IrrSpintz by  doxygen 1.5.1-p1