Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

CP4D Class Reference

#include <CP4D.h>

List of all members.

Public Methods

 CP4D ()
 CP4D (double rdX, double rdY, double rdZ)
 CP4D (double rdX, double rdY, double rdZ, double rdW)
 CP4D (const CP4D &Point)
 operator CP3D () const
const CP4D & operator= (const CP4D &)
int operator== (const CP4D &)
int operator!= (const CP4D &)
CP4D & operator+= (const CV4D &)
CP4D & operator-= (const CV4D &)
CV4D operator- (const CP4D &) const
CP4D operator+ (const CV4D &) const
CP4D operator- (const CV4D &) const
CP4D operator- () const
double & operator[] (int i)
double operator[] (int i) const
CV4D getCV4D () const
double getX () const
double getY () const
double getZ () const
double getW () const
void setX (double rdX)
void setY (double rdY)
void setZ (double rdZ)
void setW (double rdW)
void setCoord (double rdX, double rdY, double rdZ, double rdW)
void print () const

Static Public Attributes

double epsilon = DOUBLE_EPSILON

Protected Attributes

double m_ard [4]

Friends

class CP3D
ostream & operator<< (ostream &, const CP4D &)
istream & operator>> (istream &, CP4D &)
CP4D AffinComb3 (double, const CP4D &, double, const CP4D &, double, const CP4D &)


Detailed Description

This class provides a interface to 3D point

Author:
Michael Meissner


Constructor & Destructor Documentation

CP4D::CP4D   [inline]
 

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

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

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

CP4D::CP4D double   rdX,
double   rdY,
double   rdZ,
double   rdW
[inline]
 

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

CP4D::CP4D const CP4D &   Point [inline]
 

Copy constructor. The parameters will be simply copied.


Member Function Documentation

CV4D CP4D::getCV4D   const [inline]
 

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

double CP4D::getW   const [inline]
 

Returns the w-coordinate of the point.

double CP4D::getX void   const [inline]
 

Returns the x-coordinate of the point.

double CP4D::getY void   const [inline]
 

Returns the y-coordinate of the point.

double CP4D::getZ void   const [inline]
 

Returns the z-coordinate of the point.

CP4D::operator CP3D   const
 

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

int CP4D::operator!= const CP4D &   pnt
 

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

See also:
operator==()

CP4D CP4D::operator+ const CV4D &   v const
 

Adds a vector to a point.

CP4D & CP4D::operator+= const CV4D &   v
 

Adds a vector to this point.

CP4D CP4D::operator-   const
 

Negates the point.

CP4D CP4D::operator- const CV4D &   v const
 

Subtracts a vector from a point.

CV4D CP4D::operator- const CP4D &   cPoint const
 

Subtracts two points. The resulting vector is returned.

CP4D & CP4D::operator-= const CV4D &   v
 

Subtracts a vector from this point.

const CP4D & CP4D::operator= const CP4D &   cPoint [inline]
 

Assign one point to another.

int CP4D::operator== const CP4D &   pnt
 

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

double CP4D::operator[] int   i const [inline]
 

Same as above but does not alter anything.

double& CP4D::operator[] int   i [inline]
 

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

void CP4D::print void   const
 

Prints a point to the standard output.

void CP4D::setCoord double   rdX,
double   rdY,
double   rdZ,
double   rdW
[inline]
 

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

void CP4D::setW double   rdW [inline]
 

Sets the w-coordinate of the point to 'rdW'.

void CP4D::setX double   rdX [inline]
 

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

void CP4D::setY double   rdY [inline]
 

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

void CP4D::setZ double   rdZ [inline]
 

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


Friends And Related Function Documentation

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

Returns the affine combination of the points and vectors.

friend class CP3D [friend]
 

ostream& operator<< ostream &   s,
const CP4D &   v
[friend]
 

Same as above. But more useful for streams.

istream& operator>> istream &   s,
CP4D &   v
[friend]
 

Reads a point from the given stream.


Member Data Documentation

double CP4D::epsilon = DOUBLE_EPSILON [static]
 

double CP4D::m_ard[4] [protected]
 


The documentation for this class was generated from the following files:
Generated at Thu Oct 4 17:17:29 2001 for QGLViewer by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001