#include <irtkVector3D.h>
Definition at line 23 of file irtkVector3D.h.
Public Member Functions | |
irtkVector3D (T x=0, T y=0, T z=0) | |
Constructor. | |
void | Normalize () |
Normalizes the vector. | |
double | Length () const |
Returns the length of the vector. | |
irtkVector3D | operator * (double s) |
Operator for multiplying by a scalar. | |
irtkVector3D | operator+ (const irtkVector3D &v) |
Operator for adding two vectors. | |
irtkVector3D | operator- (const irtkVector3D &v) |
Operator for subtraction. | |
irtkVector3D & | operator *= (double s) |
Operator for multiplying by a scalar. | |
irtkVector3D & | operator *= (const irtkVector3D &v) |
Operator for mulityplying by a vector. | |
irtkVector3D & | operator+= (const irtkVector3D &v) |
Operator for adding a vector. | |
irtkVector3D & | operator-= (const irtkVector3D &v) |
Operator for subtracting a vector. | |
bool | operator== (const irtkVector3D &v) |
Operator for testing equality of two vectors. | |
bool | operator!= (const irtkVector3D &v) |
Operator for testing non-equality of two vector. | |
bool | operator< (const irtkVector3D &v) |
Operator for comparing sizes of vectors. | |
bool | operator> (const irtkVector3D &v) |
Operator for comparing sizes of vectors. | |
bool | operator<= (const irtkVector3D &v) |
Operator for comparing sizes of vectors. | |
bool | operator>= (const irtkVector3D &v) |
Operator for comparing sizes of vectors. | |
irtkVector3D & | operator/= (const irtkVector3D &v) |
Operator for dividing one vector by another. | |
irtkVector3D | operator/ (const irtkVector3D &v) |
Operator for dividing one vector by another. | |
irtkVector3D & | operator/= (double s) |
Operator for dividing a vector by a scalar. | |
irtkVector3D | operator/ (double s) |
Operator for dividing a vector by a scalar. | |
Static Public Member Functions | |
static irtkVector3D | CrossProduct (const irtkVector3D &v1, const irtkVector3D &v2) |
Takes the cross-product of two vectors. | |
static double | DotProduct (const irtkVector3D &v1, const irtkVector3D &v2) |
Takes the dot-product of two vectors. | |
Public Attributes | |
T | _x |
The x-component. | |
T | _y |
The y-component. | |
T | _z |
The z-component. |
irtkVector3D< T >::irtkVector3D | ( | T | x = 0 , |
|
T | y = 0 , |
|||
T | z = 0 | |||
) | [inline] |
Constructor.
Definition at line 103 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
void irtkVector3D< T >::Normalize | ( | void | ) | [inline] |
Normalizes the vector.
Definition at line 110 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
double irtkVector3D< T >::Length | ( | ) | const [inline] |
Returns the length of the vector.
Definition at line 121 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > irtkVector3D< T >::operator * | ( | double | s | ) | [inline] |
Operator for multiplying by a scalar.
Definition at line 142 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > irtkVector3D< T >::operator+ | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for adding two vectors.
Definition at line 153 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > irtkVector3D< T >::operator- | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for subtraction.
Definition at line 164 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > & irtkVector3D< T >::operator *= | ( | double | s | ) | [inline] |
Operator for multiplying by a scalar.
Definition at line 176 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > & irtkVector3D< T >::operator *= | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for mulityplying by a vector.
Definition at line 185 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > & irtkVector3D< T >::operator+= | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for adding a vector.
Definition at line 194 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > & irtkVector3D< T >::operator-= | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for subtracting a vector.
Definition at line 203 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
bool irtkVector3D< T >::operator== | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for testing equality of two vectors.
Definition at line 212 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
bool irtkVector3D< T >::operator!= | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for testing non-equality of two vector.
Definition at line 217 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
bool irtkVector3D< T >::operator< | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for comparing sizes of vectors.
Definition at line 222 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
bool irtkVector3D< T >::operator> | ( | const irtkVector3D< T > & | v | ) | [inline] |
Operator for comparing sizes of vectors.
Definition at line 229 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
bool irtkVector3D< T >::operator<= | ( | const irtkVector3D< T > & | v | ) | [inline] |
bool irtkVector3D< T >::operator>= | ( | const irtkVector3D< T > & | v | ) | [inline] |
irtkVector3D& irtkVector3D< T >::operator/= | ( | const irtkVector3D< T > & | v | ) |
Operator for dividing one vector by another.
irtkVector3D irtkVector3D< T >::operator/ | ( | const irtkVector3D< T > & | v | ) |
Operator for dividing one vector by another.
irtkVector3D< T > & irtkVector3D< T >::operator/= | ( | double | s | ) | [inline] |
Operator for dividing a vector by a scalar.
Definition at line 246 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > irtkVector3D< T >::operator/ | ( | double | s | ) | [inline] |
Operator for dividing a vector by a scalar.
Definition at line 255 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
irtkVector3D< T > irtkVector3D< T >::CrossProduct | ( | const irtkVector3D< T > & | v1, | |
const irtkVector3D< T > & | v2 | |||
) | [inline, static] |
Takes the cross-product of two vectors.
Definition at line 126 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
double irtkVector3D< T >::DotProduct | ( | const irtkVector3D< T > & | v1, | |
const irtkVector3D< T > & | v2 | |||
) | [inline, static] |
Takes the dot-product of two vectors.
Definition at line 137 of file irtkVector3D.h.
References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.
T irtkVector3D< T >::_x |
The x-component.
Definition at line 27 of file irtkVector3D.h.
Referenced by irtkVector3D< T >::CrossProduct(), irtkVector3D< T >::DotProduct(), irtkVector3D< T >::irtkVector3D(), irtkVector3D< T >::Length(), irtkVector3D< T >::Normalize(), irtkVector3D< T >::operator *(), irtkVector3D< T >::operator *=(), irtkVector3D< T >::operator!=(), irtkVector3D< T >::operator+(), irtkVector3D< T >::operator+=(), irtkVector3D< T >::operator-(), irtkVector3D< T >::operator-=(), irtkVector3D< T >::operator/(), irtkVector3D< T >::operator/=(), irtkVector3D< T >::operator<(), irtkVector3D< T >::operator==(), and irtkVector3D< T >::operator>().
T irtkVector3D< T >::_y |
The y-component.
Definition at line 30 of file irtkVector3D.h.
Referenced by irtkVector3D< T >::CrossProduct(), irtkVector3D< T >::DotProduct(), irtkVector3D< T >::irtkVector3D(), irtkVector3D< T >::Length(), irtkVector3D< T >::Normalize(), irtkVector3D< T >::operator *(), irtkVector3D< T >::operator *=(), irtkVector3D< T >::operator!=(), irtkVector3D< T >::operator+(), irtkVector3D< T >::operator+=(), irtkVector3D< T >::operator-(), irtkVector3D< T >::operator-=(), irtkVector3D< T >::operator/(), irtkVector3D< T >::operator/=(), irtkVector3D< T >::operator<(), irtkVector3D< T >::operator==(), and irtkVector3D< T >::operator>().
T irtkVector3D< T >::_z |
The z-component.
Definition at line 33 of file irtkVector3D.h.
Referenced by irtkVector3D< T >::CrossProduct(), irtkVector3D< T >::DotProduct(), irtkVector3D< T >::irtkVector3D(), irtkVector3D< T >::Length(), irtkVector3D< T >::Normalize(), irtkVector3D< T >::operator *(), irtkVector3D< T >::operator *=(), irtkVector3D< T >::operator!=(), irtkVector3D< T >::operator+(), irtkVector3D< T >::operator+=(), irtkVector3D< T >::operator-(), irtkVector3D< T >::operator-=(), irtkVector3D< T >::operator/(), irtkVector3D< T >::operator/=(), irtkVector3D< T >::operator<(), irtkVector3D< T >::operator==(), and irtkVector3D< T >::operator>().