|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
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 30 of file Vector3D.h.
|
inline |
Default constructor.
Definition at line 126 of file Vector3D.h.
References v.
Referenced by operator-().
| Vector3D::Vector3D | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
| void Vector3D::clear | ( | ) |
| void Vector3D::getComponents | ( | double & | x, |
| double & | y, | ||
| double & | z | ||
| ) | const |
Get components.
Definition at line 81 of file Vector3D.cpp.
References v.
Referenced by Euclid3D::getAll().
|
inline |
Get component.
Definition at line 132 of file Vector3D.h.
References v.
Referenced by BendBase::getChordLength(), and Euclid3D::getX().
|
inline |
Get component.
Definition at line 134 of file Vector3D.h.
References v.
Referenced by BendBase::getChordLength(), and Euclid3D::getY().
|
inline |
Get component.
Definition at line 136 of file Vector3D.h.
References v.
Referenced by BendBase::getChordLength(), and Euclid3D::getZ().
| bool Vector3D::isZero | ( | ) | const |
Test for zero.
Definition at line 87 of file Vector3D.cpp.
References v.
Referenced by Euclid3D::isPureXRotation(), Euclid3D::isPureYRotation(), Euclid3D::isPureZRotation(), and Euclid3D::setDisplacement().
| bool Vector3D::operator!= | ( | const Vector3D & | rhs | ) | const |
Definition at line 57 of file Vector3D.cpp.
References v.
|
inline |
|
inline |
| Vector3D & Vector3D::operator*= | ( | double | factor | ) |
| Vector3D Vector3D::operator- | ( | ) | const |
Negative vector.
Definition at line 61 of file Vector3D.cpp.
References v, and Vector3D().

| bool Vector3D::operator== | ( | const Vector3D & | rhs | ) | const |
Definition at line 53 of file Vector3D.cpp.
References v.
|
inline |
Set component.
Definition at line 138 of file Vector3D.h.
References v.
Referenced by Euclid3D::setX().
|
inline |
Set component.
Definition at line 140 of file Vector3D.h.
References v.
Referenced by Euclid3D::setY().
|
inline |
Set component.
Definition at line 142 of file Vector3D.h.
References v.
Referenced by Euclid3D::setZ().
|
protected |
Definition at line 99 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().