irtkVector3D< T > Class Template Reference

#include <irtkVector3D.h>

Inheritance diagram for irtkVector3D< T >:

Inheritance graph
[legend]
Collaboration diagram for irtkVector3D< T >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename T>
class irtkVector3D< T >

Represents a 3D vector.

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.
irtkVector3Doperator *= (double s)
 Operator for multiplying by a scalar.
irtkVector3Doperator *= (const irtkVector3D &v)
 Operator for mulityplying by a vector.
irtkVector3Doperator+= (const irtkVector3D &v)
 Operator for adding a vector.
irtkVector3Doperator-= (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.
irtkVector3Doperator/= (const irtkVector3D &v)
 Operator for dividing one vector by another.
irtkVector3D operator/ (const irtkVector3D &v)
 Operator for dividing one vector by another.
irtkVector3Doperator/= (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

_x
 The x-component.
_y
 The y-component.
_z
 The z-component.

Constructor & Destructor Documentation

template<typename T>
irtkVector3D< T >::irtkVector3D ( x = 0,
y = 0,
z = 0 
) [inline]

Constructor.

Definition at line 103 of file irtkVector3D.h.

References irtkVector3D< T >::_x, irtkVector3D< T >::_y, and irtkVector3D< T >::_z.


Member Function Documentation

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
bool irtkVector3D< T >::operator<= ( const irtkVector3D< T > &  v  )  [inline]

Operator for comparing sizes of vectors.

Definition at line 236 of file irtkVector3D.h.

template<typename T>
bool irtkVector3D< T >::operator>= ( const irtkVector3D< T > &  v  )  [inline]

Operator for comparing sizes of vectors.

Definition at line 241 of file irtkVector3D.h.

template<typename T>
irtkVector3D& irtkVector3D< T >::operator/= ( const irtkVector3D< T > &  v  ) 

Operator for dividing one vector by another.

template<typename T>
irtkVector3D irtkVector3D< T >::operator/ ( const irtkVector3D< T > &  v  ) 

Operator for dividing one vector by another.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.


Member Data Documentation

template<typename T>
T irtkVector3D< T >::_x

template<typename T>
T irtkVector3D< T >::_y

template<typename T>
T irtkVector3D< T >::_z


The documentation for this class was generated from the following file: