3D Mathematical vector More...
#include <Vector3D.hpp>
Public Member Functions | |
Vector3D (void) | |
Null constructor. More... | |
Vector3D (double ix, double iy, double iz) | |
Class constructor. More... | |
Vector3D (const Vector3D &v) | |
Class copy constructor. More... | |
void | Set (double ix, double iy, double iz) |
Set vector components. More... | |
Vector3D & | operator+= (Vector3D const &v) |
Addition. More... | |
Vector3D & | operator-= (Vector3D const &v) |
Subtraction. More... | |
Vector3D & | operator= (Vector3D const &v) |
Assignment operator. More... | |
Vector3D & | operator*= (double s) |
Scalar product. More... | |
bool | operator== (Vector3D const &v) |
Compare 3D-Vectors (up to an arbitrary precision) More... | |
void | RotateX (double a) |
Rotates the vector around the X axes. More... | |
void | RotateY (double a) |
Rotates the vector around the Y axes. More... | |
void | RotateZ (double a) |
Rotates the vector around the Z axes. More... | |
void | Round () |
Integer round of the vector's entries. | |
Public Attributes | |
double | x |
Component in the x direction. | |
double | y |
Component in the y direction. | |
double | z |
Component in the z direction. | |
3D Mathematical vector
Definition at line 15 of file Vector3D.hpp.
Vector3D::Vector3D | ( | void | ) |
Null constructor.
Sets all components to 0
Definition at line 49 of file Vector3D.cpp.
Vector3D::Vector3D | ( | double | ix, |
double | iy, | ||
double | iz | ||
) |
Class constructor.
ix | x Component |
iy | y Component |
iz | z Component |
Definition at line 52 of file Vector3D.cpp.
Vector3D::Vector3D | ( | const Vector3D & | v | ) |
Vector3D & Vector3D::operator*= | ( | double | s | ) |
Scalar product.
s | Scalar |
Definition at line 75 of file Vector3D.cpp.
Addition.
v | Vector to be added |
Definition at line 83 of file Vector3D.cpp.
Subtraction.
v | Vector to be subtracted |
Definition at line 91 of file Vector3D.cpp.
Assignment operator.
v | Vector to be copied |
Definition at line 65 of file Vector3D.cpp.
bool Vector3D::operator== | ( | Vector3D const & | v | ) |
Compare 3D-Vectors (up to an arbitrary precision)
v | Vector to be compared to |
Definition at line 101 of file Vector3D.cpp.
void Vector3D::RotateX | ( | double | a | ) |
Rotates the vector around the X axes.
a | Angle of rotation (in radians) |
Definition at line 106 of file Vector3D.cpp.
void Vector3D::RotateY | ( | double | a | ) |
Rotates the vector around the Y axes.
a | Angle of rotation (in radians) |
Definition at line 116 of file Vector3D.cpp.
void Vector3D::RotateZ | ( | double | a | ) |
Rotates the vector around the Z axes.
a | Angle of rotation (in radians) |
Definition at line 126 of file Vector3D.cpp.
void Vector3D::Set | ( | double | ix, |
double | iy, | ||
double | iz | ||
) |
Set vector components.
ix | x Component |
iy | y Component |
iz | z Component |
Definition at line 58 of file Vector3D.cpp.