Three dimensional point. More...
#include "Point3D.h"
Public Member Functions | |
Point3D (T _x, T _y, T _z) | |
Constructor. | |
Point3D (const Point3D< T > &_other) | |
Copy constructor. | |
Point3D< T > & | operator= (const Point3D< T > &_other) |
Point3D< T > | operator+ (const Point3D< T > &_other) const |
Point3D< T > | operator- (const Point3D< T > &_other) const |
Point3D< T > | operator* (const Point3D< T > &_other) const |
Point3D< T > | operator/ (const Point3D< T > &_other) const |
Point3D< T > & | operator+= (const Point3D< T > &_other) |
Point3D< T > & | operator-= (const Point3D< T > &_other) |
Point3D< T > & | operator*= (const Point3D< T > &_other) |
Point3D< T > & | operator/= (const Point3D< T > &_other) |
bool | operator== (const Point3D< T > &_other) |
bool | operator!= (const Point3D< T > &_other) |
T | x (void) const |
Returns the current X value. | |
T | y (void) const |
Returns the current Y value. | |
T | z (void) const |
Returns the current Z value. | |
void | setX (T _x) |
Will set the X value. | |
void | setY (T _y) |
Will set the Y value. | |
void | setZ (T _z) |
Will set the Z value. | |
T | addX (T _v) |
Will add the provided value to the X value and return the new X value. | |
T | addY (T _v) |
Will add the provided value to the Y value and return the new Y value. | |
T | addZ (T _z) |
Will add the provided value to the Z value and return the new Z value. | |
T | subX (T _v) |
Will subtract the provided value from the X value and return the new X value. | |
T | subY (T _v) |
Will subtract the provided value from the Y value and return the new Y value. | |
T | subZ (T _v) |
Will subtract the provided value from the Z value and return the new Z value. | |
Three dimensional point.
Point3D::Point3D | ( | T | _x, |
T | _y, | ||
T | _z ) |
Constructor.
_x | The initial X value |
_y | The initial Y value |
_z | The initial Z value |
Point3D::Point3D | ( | const Point3D< T > & | _other | ) |
Copy constructor.
_other | The other 3D point |
T Point3D::addX | ( | T | _v | ) |
Will add the provided value to the X value and return the new X value.
_v | The value to add |
T Point3D::addY | ( | T | _v | ) |
Will add the provided value to the Y value and return the new Y value.
_v | The value to add |
T Point3D::addZ | ( | T | _z | ) |
Will add the provided value to the Z value and return the new Z value.
_v | The value to add |
bool Point3D::operator!= | ( | const Point3D< T > & | _other | ) |
bool Point3D::operator== | ( | const Point3D< T > & | _other | ) |
|
inline |
Will set the X value.
_x | The X value to set |
|
inline |
Will set the Y value.
_y | The Y value to set |
|
inline |
Will set the Z value.
_z | The Z value to set |
T Point3D::subX | ( | T | _v | ) |
Will subtract the provided value from the X value and return the new X value.
_v | The value to subtract |
T Point3D::subY | ( | T | _v | ) |
Will subtract the provided value from the Y value and return the new Y value.
_v | The value to subtract |
T Point3D::subZ | ( | T | _v | ) |
Will subtract the provided value from the Z value and return the new Z value.
_v | The value to subtract |
|
inline |
Returns the current X value.
|
inline |
Returns the current Y value.
|
inline |
Returns the current Z value.