Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CP3D Class Reference

#include <CP3D.h>

List of all members.

Public Member Functions

 CP3D ()
 CP3D (double rdX, double rdY, double rdZ)
 CP3D (const CP3D &Point)
 operator CP4D () const
const CP3Doperator= (const CP3D &)
int operator== (const CP3D &) const
int operator!= (const CP3D &) const
CP3Doperator+= (const CV3D &)
CP3Doperator-= (const CV3D &)
CP3Doperator *= (const CV3D &)
CP3Doperator *= (double)
CP3Doperator/= (double)
CP3D operator+ (const CV3D &) const
CP3D operator+ (const CP3D &) const
CP3D operator- (const CV3D &) const
CV3D operator- (const CP3D &) const
CP3D operator * (const CV3D &) const
CP3D operator * (double) const
CP3D operator/ (const CV3D &) const
CP3D operator/ (double) 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
CV3D getCV3D () 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)
void print () const

Static Public Attributes

double epsilon = DOUBLE_EPSILON

Protected Attributes

double m_ard [3]

Friends

CP3D AffinComb (const CP3D &, double, const CP3D &)
CP3D AffinComb3 (double r, const CP3D &R, double s, const CP3D &S, double t, const CP3D T)
double dist (const CP3D &, const CP3D &)
double quaddist (const CP3D &, const CP3D &)
CP3D Min (const CP3D &, const CP3D &)
CP3D Max (const CP3D &, const CP3D &)
CP3D operator * (double, const CP3D &)
CP3D MidPoint (const CP3D &, const CP3D &)
ostream & operator<< (ostream &, const CP3D &)
istream & operator>> (istream &, CP3D &)


Detailed Description

This class provides a interface to 3D point

Author:
Michael Meissner


Constructor & Destructor Documentation

CP3D::CP3D  )  [inline]
 

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

CP3D::CP3D double  rdX,
double  rdY,
double  rdZ
[inline]
 

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

CP3D::CP3D const CP3D Point  )  [inline]
 

Copy constructor. The parameters will simply be copied.


Member Function Documentation

double CP3D::getAbsMaxComponent void   )  const [inline]
 

Returns the value of the maximal point component.

int CP3D::getAbsMaxComponentCoord void   )  const
 

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

double CP3D::getAbsMinComponent void   )  const [inline]
 

Returns the value of the minimal point component.

int CP3D::getAbsMinComponentCoord void   )  const
 

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

CV3D CP3D::getCV3D  )  const [inline]
 

Converts a point to a vector. It's implemented as 'get'-method to prevent implicit casting by the compiler.

double CP3D::getMaxComponent void   )  const [inline]
 

Returns the value of the maximal point component.

int CP3D::getMaxComponentCoord void   )  const
 

Returns the coordinate index of the maximum point component.

double CP3D::getMinComponent void   )  const [inline]
 

Returns the value of the minimal point component.

int CP3D::getMinComponentCoord void   )  const
 

Returns the coordinate index of the minial point component.

double CP3D::getX void   )  const [inline]
 

Returns the x-coordinate of the point.

double CP3D::getY void   )  const [inline]
 

Returns the y-coordinate of the point.

double CP3D::getZ void   )  const [inline]
 

Returns the z-coordinate of the point.

CP3D CP3D::operator * double   )  const
 

Multiplies a point by a scalar.

CP3D CP3D::operator * const CV3D  )  const
 

Multiplies a point by a vector.

CP3D & CP3D::operator *= double   ) 
 

Multiplies a point by a scalar.

CP3D & CP3D::operator *= const CV3D  ) 
 

Multiplies a point by a vector.

CP3D::operator CP4D  )  const
 

Cast operator to convert CP3D points to CP4D points. Each component is devided by the fourth component.

int CP3D::operator!= const CP3D  )  const
 

Compares to points for not being equal. Same as operator== but inverted.

See also:
operator==()

CP3D CP3D::operator+ const CP3D  )  const
 

Adds a point to a point.

CP3D CP3D::operator+ const CV3D  )  const
 

Adds a vector to a point.

CP3D & CP3D::operator+= const CV3D  ) 
 

Adds a vector to this point.

CV3D CP3D::operator- const CP3D  )  const
 

Substracts a point from a point.

CP3D CP3D::operator- const CV3D  )  const
 

Substracts a vector from a point.

CP3D & CP3D::operator-= const CV3D  ) 
 

Subtracts a vector from this point.

CP3D CP3D::operator/ double   )  const
 

Divides a point by a scalar.

CP3D CP3D::operator/ const CV3D  )  const
 

Divides a point by a vector.

CP3D & CP3D::operator/= double   ) 
 

Divides a point by a scalar.

const CP3D & CP3D::operator= const CP3D  )  [inline]
 

Assign one point to another.

int CP3D::operator== const CP3D  )  const
 

Compares to points for being equal. The result will be 'true'(1) if the two point are indentically up to <= CP3D::epsilon for each component. Otherwise 'false'(0) will be returned.

double CP3D::operator[] int  i  )  const [inline]
 

Same as above but does not alter anything.

double& CP3D::operator[] int  i  )  [inline]
 

Returns the i-th component of the point. The index goes from 0 to 2, 0 stands for the x-coordinate, 1 for the y-coordinate and so on.

void CP3D::print  )  const
 

Prints a point to the standard output.

void CP3D::setCoord double  rdX,
double  rdY,
double  rdZ
[inline]
 

Set the values of the point. The value of the point will be (rdX, rdY, rdZ).

void CP3D::setX double  rdX  )  [inline]
 

Sets the x-coordinate of the point to 'rdX'.

void CP3D::setY double  rdY  )  [inline]
 

Sets the y-coordinate of the point to 'rdX'.

void CP3D::setZ double  rdZ  )  [inline]
 

Sets the z-coordinate of the point to 'rdX'.


Friends And Related Function Documentation

CP3D AffinComb const CP3D ,
double  ,
const CP3D
[friend]
 

Returns the affine combination of the points and vectors.

CP3D AffinComb3 double  r,
const CP3D R,
double  s,
const CP3D S,
double  t,
const CP3D  T
[friend]
 

Returns the affine combination of the points and vectors.

double dist const CP3D ,
const CP3D
[friend]
 

Returns the distance between two points.

CP3D Max const CP3D Point1,
const CP3D Point2
[friend]
 

Returns the maximum of all components of two points.

CP3D MidPoint const CP3D Point1,
const CP3D Point2
[friend]
 

Returns the point in the middle between two points.

CP3D Min const CP3D Point1,
const CP3D Point2
[friend]
 

Returns the minimum of all components of two points.

CP3D operator * double  rfValue,
const CP3D Point
[friend]
 

Returns a point being the result of multiplying a scalar and a point.

ostream& operator<< ostream &  s,
const CP3D pnt
[friend]
 

Same as above. But more useful for streams.

istream& operator>> istream &  s,
CP3D pnt
[friend]
 

Reads a point from the given stream.

double quaddist const CP3D ,
const CP3D
[friend]
 

Returns the square of the distance between two points.


Member Data Documentation

double CP3D::epsilon = DOUBLE_EPSILON [static]
 

double CP3D::m_ard[3] [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Oct 20 17:24:14 2003 for QGLViewer by doxygen 1.3.4