PARTONS/NumA++
|
Numerical Analysis C++ routines
|
Object representing a three-dimensional vector. More...
Public Member Functions | |
Vector3D () | |
Default constructor. More... | |
Vector3D (double x, double y, double z) | |
Constructor. More... | |
~Vector3D () | |
Default destructor. More... | |
double | operator* (const Vector3D &rhs) const |
Scalar product. More... | |
double | getZ () const |
void | setZ (double z) |
std::string | toString () const |
Return a formatted characters string to display vector's values. More... | |
Public Member Functions inherited from NumA::Vector2D | |
Vector2D () | |
Default constructor. More... | |
Vector2D (double x, double y) | |
Constructor. More... | |
~Vector2D () | |
Default destructor. More... | |
double | getX () const |
void | setX (double x) |
double | getY () const |
void | setY (double y) |
Vector2D | operator+ (Vector2D const &rhs) |
Addition of two vectors. More... | |
void | operator+= (Vector2D const &rhs) |
Addition with a scalar. More... | |
Vector2D | operator- (Vector2D const &rhs) |
Subtraction of two vectors. More... | |
void | operator-= (Vector2D const &rhs) |
Subtraction with a scalar. More... | |
Private Attributes | |
double | m_z |
z-coordinate. More... | |
Object representing a three-dimensional vector.
NumA::Vector3D::Vector3D | ( | ) |
Default constructor.
NumA::Vector3D::Vector3D | ( | double | x, |
double | y, | ||
double | z | ||
) |
Constructor.
x | x-coordinate. |
y | y-coordinate. |
z | z-coordinate. |
NumA::Vector3D::~Vector3D | ( | ) |
Default destructor.
double NumA::Vector3D::getZ | ( | ) | const |
double NumA::Vector3D::operator* | ( | const Vector3D & | rhs | ) | const |
void NumA::Vector3D::setZ | ( | double | z | ) |
z | z-coordinate. |
std::string NumA::Vector3D::toString | ( | ) | const |
Return a formatted characters string to display vector's values.
|
private |
z-coordinate.