#include <point.h>
Public Types | |
enum | { X_AXIS = 1, Y_AXIS = 2, Z_AXIS = 3 } |
Public Methods | |
TPoint (double x=0, double y=0, double z=0) | |
TPoint (const TPoint &point) | |
double | getLength () const |
double | GetX () const |
double | GetY () const |
double | GetZ () const |
bool | isNull () const |
bool | LinearDependence (const TPoint &two, double dAccuracy=dEps) const |
bool | load (TDataPackageList *in, const string &sIdentifier, bool bUnique=true) |
double | Magnitude () const |
TPoint & | Normalize () |
bool | operator== (const TPoint &point) const |
TPoint & | operator+= (const TPoint &point) |
TPoint & | operator-= (const TPoint &point) |
TPoint | operator+ (const TPoint &point) const |
TPoint | operator- (const TPoint &point) const |
TPoint & | operator *= (const double dScale) |
TPoint | operator * (const double dScale) const |
double | operator * (const TPoint &point) const |
void | Rescale (double dScale) |
bool | save (TDataPackageList *out, const string &sIdentifier, bool bUnique=true, bool bAutoDelete=false) const |
void | setNull () |
void | SetPoint (double x=0, double y=0, double z=0) |
void | SetX (double x) |
void | SetY (double y) |
void | SetZ (double z) |
ostream & | Write (ostream &stream) const |
Protected Attributes | |
double | dX |
double | dY |
double | dZ |
Static Protected Attributes | |
const double | dEps |
|
The standard constructor for defining a 3d point.
|
|
The TPoint copy constructor.
|
|
Calculates the euclidean length of the distance from the point to (0,0,0).
|
|
|
|
|
|
|
|
|
|
Analyses if two points (or better "vectors") are linear dependent or not.
|
|
Loads a TPoint object from a list of data packages. Note that a successful load will delete the datapackage from the data package list as well as the datapackage itself.
|
|
Calculates the euclidean length of the distance from the point to (0,0,0).
|
|
Sets the length of the vector to 1. Note that the vector (0,0,0) can not be normalized.
|
|
Multiplies two objects with type TPoint, using the "dot product".
|
|
Multiplies the point with a scalar quantity.
|
|
Multiplies this point with a scalar quantity.
|
|
Calculates the sum of two points.
|
|
Incrementing the point by point.
|
|
The difference of two points (vectors) = a-b
|
|
Subtracting point from this point.
|
|
Comparison operator.
|
|
Multiplies the point with a scalar quantity.
|
|
Creates the data package for a TPoint object and adds it to the data package list.
|
|
Sets all coordinates to 0. |
|
Sets all three coordinates of the point. |
|
Sets the x coordinate of the point. |
|
Sets the y coordinate of the point. |
|
Sets the z coordinate of the point. |
|
Writes the current position to a stream, using the following output format: (x, y, z).
|
|
Since the double arithmetic is not exact we use this constant and say that two double values are "equal" if their difference is smaller than dEps; |
|
The x-component of the point |
|
The y-component of the point |
|
The z-component of the point |