|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
|
A 3-dimension vector. More...
#include <Vector3D.h>
Public Member Functions | |
| Vector3D () | |
| Default constructor. | |
| Vector3D (double x, double y, double z) | |
| Constructor. | |
| bool | operator== (const Vector3D &) const |
| bool | operator!= (const Vector3D &) const |
| Vector3D & | operator+= (const Vector3D &vector) |
| Add and assign. | |
| Vector3D & | operator-= (const Vector3D &vector) |
| Subtract and assign. | |
| Vector3D & | operator*= (double factor) |
| Scale and assign. | |
| Vector3D | operator- () const |
| Negative vector. | |
| double & | operator() (int i) |
| Get component. | |
| double | operator() (int i) const |
| Get component. | |
| void | getComponents (double &x, double &y, double &z) const |
| Get components. | |
| double | getX () const |
| Get component. | |
| double | getY () const |
| Get component. | |
| double | getZ () const |
| Get component. | |
| void | clear () |
| Set to zero. | |
| bool | isZero () const |
| Test for zero. | |
| void | setX (double) |
| Set component. | |
| void | setY (double) |
| Set component. | |
| void | setZ (double) |
| Set component. | |
Protected Attributes | |
| double | v [3] |
A 3-dimension vector.
Definition at line 31 of file Vector3D.h.
|
inline |
Default constructor.
Definition at line 132 of file Vector3D.h.
References v.
Referenced by operator!=(), operator*=(), operator+=(), operator-(), operator-=(), and operator==().
| Vector3D::Vector3D | ( | double | x, |
| double | y, | ||
| double | z ) |
| void Vector3D::clear | ( | ) |
| void Vector3D::getComponents | ( | double & | x, |
| double & | y, | ||
| double & | z ) const |
|
inline |
|
inline |
|
inline |
| bool Vector3D::isZero | ( | ) | const |
Test for zero.
Definition at line 106 of file Vector3D.cpp.
References v.
Referenced by Euclid3D::setDisplacement().
| bool Vector3D::operator!= | ( | const Vector3D & | rhs | ) | const |
Definition at line 63 of file Vector3D.cpp.
References v, and Vector3D().
|
inline |
|
inline |
| Vector3D & Vector3D::operator*= | ( | double | factor | ) |
Scale and assign.
Definition at line 50 of file Vector3D.cpp.
References v, and Vector3D().
Add and assign.
Definition at line 34 of file Vector3D.cpp.
References v, and Vector3D().
| Vector3D Vector3D::operator- | ( | ) | const |
Negative vector.
Definition at line 68 of file Vector3D.cpp.
References v, and Vector3D().
Subtract and assign.
Definition at line 42 of file Vector3D.cpp.
References v, and Vector3D().
| bool Vector3D::operator== | ( | const Vector3D & | rhs | ) | const |
Definition at line 58 of file Vector3D.cpp.
References v, and Vector3D().
|
inline |
|
inline |
|
inline |
|
protected |
Definition at line 103 of file Vector3D.h.
Referenced by clear(), getComponents(), getX(), getY(), getZ(), isZero(), operator!=(), operator()(), operator()(), operator*=(), operator+=(), operator-(), operator-=(), operator==(), setX(), setY(), setZ(), Vector3D(), and Vector3D().