CV3D Class Reference

#include <CV3D.h>

List of all members.

Public Member Functions

 CV3D (void)
 CV3D (double rdX, double rdY, double rdZ)
 CV3D (const CV3D &Vector)
 ~CV3D (void)
 operator CV4D () const
const CV3Doperator= (const CV3D &)
bool operator== (const CV3D &) const
bool operator!= (const CV3D &) const
CV3Doperator+= (const CV3D &)
CV3Doperator-= (const CV3D &)
CV3Doperator *= (double)
CV3Doperator/= (double)
CV3D operator+ (const CV3D &) const
CV3D operator- (const CV3D &) const
CV3D operator- (void) const
double operator * (const CV3D &) const
CV3D operator * (double) const
CV3D operator/ (double) const
CV3D operator| (const CV3D &) const
double & operator[] (int i)
double operator[] (int i) const
double getMinComponent (void) const
double getAbsMinComponent (void) const
double getMaxComponent (void) const
double getAbsMaxComponent (void) const
int getMinComponentCoord (void) const
int getAbsMinComponentCoord (void) const
int getMaxComponentCoord (void) const
int getAbsMaxComponentCoord (void) const
double getX (void) const
double getY (void) const
double getZ (void) const
void setX (double rdX)
void setY (double rdY)
void setZ (double rdZ)
void setCoord (double rdX, double rdY, double rdZ)
double getNorm (void) const
void normalize (void)
CV3D getNormalized (void) const
void print (void) const

Static Public Attributes

static double epsilon = DOUBLE_EPSILON

Protected Attributes

double m_ard [3]

Friends

CV3D operator * (double, const CV3D &)
ostream & operator<< (ostream &, const CV3D &)
istream & operator>> (istream &, CV3D &)


Detailed Description

This class implements a vector class for 3D coordinates including functionality to vector calculations.

Author:
Markus Janich, Michael Meissner, Rainer Jaeger


Constructor & Destructor Documentation

CV3D::CV3D ( void   )  [inline]

Default constructor. The default value of the instantiated vector will be (0.0,0.0,0.0).

CV3D::CV3D ( double  rdX,
double  rdY,
double  rdZ 
) [inline]

Construct new vector. The value of the vector will be (rdX, rdY, rdZ).

CV3D::CV3D ( const CV3D Vector  )  [inline]

Copyconstructor. Initializes the new vector with the vector passed in 'v'.

CV3D::~CV3D ( void   )  [inline]

Default destructor.


Member Function Documentation

double CV3D::getAbsMaxComponent ( void   )  const [inline]

Returns the value of the maximal point component.

int CV3D::getAbsMaxComponentCoord ( void   )  const

Returns the coordinate index of the maximum point component (using fabs).

double CV3D::getAbsMinComponent ( void   )  const [inline]

Returns the value of the minimal point component.

int CV3D::getAbsMinComponentCoord ( void   )  const

Returns the coordinate index of the minial point component (using fabs).

double CV3D::getMaxComponent ( void   )  const [inline]

Returns the value of the maximal point component.

int CV3D::getMaxComponentCoord ( void   )  const

Returns the coordinate index of the maximum point component.

double CV3D::getMinComponent ( void   )  const [inline]

Returns the value of the minimal point component.

int CV3D::getMinComponentCoord ( void   )  const

Returns the coordinate index of the minial point component.

double CV3D::getNorm ( void   )  const [inline]

Returns the euclidian norm of the vector.

CV3D CV3D::getNormalized ( void   )  const

Returns the normalized vector.

double CV3D::getX ( void   )  const [inline]

Returns the x-coordinate of the vector.

double CV3D::getY ( void   )  const [inline]

Returns the y-coordinate of the vector.

double CV3D::getZ ( void   )  const [inline]

Returns the z-coordinate of the vector.

void CV3D::normalize ( void   ) 

Normalizes the vector.

CV3D CV3D::operator * ( double   )  const

Multiplication of a vector with a scalar.

double CV3D::operator * ( const CV3D  )  const

Scalar multiplication of two vectors. The result will be returned.

CV3D & CV3D::operator *= ( double   ) 

Multiplies a vector with a scalar.

CV3D::operator CV4D (  )  const

Cast operator to convert CV3D vectors to CV4D vectors. Initializes the new vector with this vector. The component 'w' is set to 1.0.

bool CV3D::operator!= ( const CV3D  )  const

Compares to vectors. Same as above. Only the result is negated.

See also:
operator==()

CV3D CV3D::operator+ ( const CV3D  )  const

Adds two vectors. The sum will be returned.

CV3D & CV3D::operator+= ( const CV3D  ) 

Adds another vector to this vector.

CV3D CV3D::operator- ( void   )  const

Negates the vector.

CV3D CV3D::operator- ( const CV3D  )  const

Subtracts two vectors. The difference will be returned.

CV3D & CV3D::operator-= ( const CV3D  ) 

Subtracts another vector from this vector.

CV3D CV3D::operator/ ( double   )  const

Division of a vector with a scalar.

CV3D & CV3D::operator/= ( double   ) 

Multiplies a vector with a scalar.

const CV3D & CV3D::operator= ( const CV3D  )  [inline]

Assign one vector to another.

bool CV3D::operator== ( const CV3D  )  const

Compares to vectors. The result will be 'true' if the two vector are indentically in each coefficient. Otherwise 'false' will be returned.

double CV3D::operator[] ( int  i  )  const [inline]

Same as above but for constant vectors.

double& CV3D::operator[] ( int  i  )  [inline]

Returns the i-th coefficient or the vector. The index goes from 0 to 3, so 0 stands for the x-coordinate, 1 for the y-coordinate and so on.

CV3D CV3D::operator| ( const CV3D  )  const

crossproduct.

void CV3D::print ( void   )  const

Prints a vector to the standard output.

void CV3D::setCoord ( double  rdX,
double  rdY,
double  rdZ 
) [inline]

Set the value of the vector. The value of the vector will be (rdX, rdY, rdZ, rdW).

void CV3D::setX ( double  rdX  )  [inline]

Sets the x-coordinate of the vector to 'x'.

void CV3D::setY ( double  rdY  )  [inline]

Sets the y-coordinate of the vector to 'y'.

void CV3D::setZ ( double  rdZ  )  [inline]

Sets the z-coordinate of the vector to 'z'.


Friends And Related Function Documentation

CV3D operator * ( double  rdFactor,
const CV3D v 
) [friend]

Multiplication of a scalar with a vector.

ostream& operator<< ( ostream &  s,
const CV3D v 
) [friend]

Same as above. But more useful for streams.

istream& operator>> ( istream &  s,
CV3D v 
) [friend]

Reads a vector from the given stream.


Member Data Documentation

double CV3D::epsilon = DOUBLE_EPSILON [static]

documentation stuff

Author:
Markus Janich, Michael Meissner, Rainer Jaeger
Version:
0.0 //see cvs docu

double CV3D::m_ard[3] [protected]


The documentation for this class was generated from the following files:
Generated on Mon Jul 10 12:45:59 2006 for QGLViewer by  doxygen 1.4.7