#include <CP3D.h>
Public Member Functions | |
CP3D () | |
CP3D (double rdX, double rdY, double rdZ) | |
CP3D (const CP3D &Point) | |
operator CP4D () const | |
const CP3D & | operator= (const CP3D &) |
int | operator== (const CP3D &) const |
int | operator!= (const CP3D &) const |
CP3D & | operator+= (const CV3D &) |
CP3D & | operator-= (const CV3D &) |
CP3D & | operator *= (const CV3D &) |
CP3D & | operator *= (double) |
CP3D & | operator/= (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 | |
static 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 &) |
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.
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 *= | ( | double | ) |
Multiplies a point by a scalar.
CP3D::operator CP4D | ( | ) | const |
int CP3D::operator!= | ( | const CP3D & | ) | const |
Compares to points for not being equal. Same as operator== but inverted.
CP3D CP3D::operator/ | ( | double | ) | const |
Divides a point by a scalar.
CP3D & CP3D::operator/= | ( | double | ) |
Divides a point by a scalar.
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'.
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.
Returns the maximum of all components of two points.
Returns the point in the middle between two points.
Returns the minimum of all components of two points.
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.
Returns the square of the distance between two points.
double CP3D::epsilon = DOUBLE_EPSILON [static] |
double CP3D::m_ard[3] [protected] |