#include <CP4D.h>
Public Member Functions | |
| 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 &) |
|
|
Default constructor. The default value of the instantiated point will be (0.0,0.0,0.0,0.0). |
|
||||||||||||||||
|
Construct new point. The value of the point will be (rdX, rdY, rdZ, 1). |
|
||||||||||||||||||||
|
Construct new point. The value of the point will be (rdX, rdY, rdZ, rdW). |
|
|
Copy constructor. The parameters will be simply copied. |
|
|
Converts a point to a vector. It's implemented as 'get'-method to prevent implicit casting by the compiler. |
|
|
Returns the w-coordinate of the point. |
|
|
Returns the x-coordinate of the point. |
|
|
Returns the y-coordinate of the point. |
|
|
Returns the z-coordinate of the point. |
|
|
Cast operator to convert CP4D points to CP3D points. Each component is devided by the fourth component. |
|
|
Compares to points for not being equal. Same as operator== but inverted.
|
|
|
Adds a vector to a point. |
|
|
Adds a vector to this point. |
|
|
Negates the point. |
|
|
Subtracts a vector from a point. |
|
|
Subtracts two points. The resulting vector is returned. |
|
|
Subtracts a vector from this point. |
|
|
Assign one point to another. |
|
|
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. |
|
|
Same as above but does not alter anything. |
|
|
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. |
|
|
Prints a point to the standard output. |
|
||||||||||||||||||||
|
Set the values of the point. The value of the point will be (rdX, rdY, rdZ, rdW). |
|
|
Sets the w-coordinate of the point to 'rdW'. |
|
|
Sets the x-coordinate of the point to 'rdX'. |
|
|
Sets the y-coordinate of the point to 'rdY'. |
|
|
Sets the z-coordinate of the point to 'rdZ'. |
|
||||||||||||||||||||||||||||
|
Returns the affine combination of the points and vectors. |
|
|
|
|
||||||||||||
|
Same as above. But more useful for streams. |
|
||||||||||||
|
Reads a point from the given stream. |
|
|
|
|
|
|
1.3-rc3