EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
A class representing 3D vectors. More...
#include <egs_vector.h>
Public Member Functions | |
EGS_Vector (EGS_Float xx, EGS_Float yy, EGS_Float zz) | |
EGS_Vector (const EGS_Vector &v) | |
EGS_Vector & | operator= (const EGS_Vector &v) |
EGS_Vector | operator+ (const EGS_Vector &v) const |
EGS_Vector & | operator+= (const EGS_Vector &v) |
EGS_Vector | operator- (const EGS_Vector &v) const |
EGS_Vector & | operator-= (const EGS_Vector &v) |
EGS_Vector | operator* (const EGS_Float f) const |
EGS_Vector & | operator*= (const EGS_Float f) |
EGS_Float | operator* (const EGS_Vector &v) const |
EGS_Vector | times (const EGS_Vector &v) const |
EGS_Vector | operator% (const EGS_Vector &v) const |
EGS_Vector | getScaled (const EGS_Vector &s) const |
void | scale (const EGS_Vector &s) |
EGS_Float | length () const |
EGS_Float | length2 () const |
void | normalize () |
void | rotate (EGS_Float cos_t, EGS_Float sin_t, EGS_Float c_phi, EGS_Float s_phi) |
Public Attributes | |
EGS_Float | x |
x-component | |
EGS_Float | y |
y-component | |
EGS_Float | z |
z-component | |
Friends | |
EGS_Vector | operator* (EGS_Float f, const EGS_Vector &v) |
A class representing 3D vectors.
The EGS_Vector class is used throughout egspp for representing 3D vectors in cartesian co-ordinates (e.g. particle positions and directions). It provides various convenience methods for vector additions, subtractions, multiplications, etc.
Definition at line 56 of file egs_vector.h.