Simple class to store three-dimensional basis vectors. More...
#include <Basis.h>
Public Member Functions | |
CUDA_HOSTDEV | Basis () |
Default constructor. | |
CUDA_HOSTDEV | Basis (const Vec3 &x0, const Vec3 &x1, const Vec3 &x2) |
Constructor with basis vectors. | |
CUDA_HOSTDEV | Basis (const Vec3 &p, const Vec3 &v) |
Geocentric TCN constructor. More... | |
CUDA_HOSTDEV const Vec3 & | x0 () const |
Return first basis vector. | |
CUDA_HOSTDEV const Vec3 & | x1 () const |
Return second basis vector. | |
CUDA_HOSTDEV const Vec3 & | x2 () const |
Return third basis vector. | |
CUDA_HOSTDEV void | x0 (const Vec3 &x0) |
Set the first basis vector. | |
CUDA_HOSTDEV void | x1 (const Vec3 &x1) |
Set the second basis vector. | |
CUDA_HOSTDEV void | x2 (const Vec3 &x2) |
Set the third basis vecot. | |
CUDA_HOSTDEV Vec3 | project (Vec3 &vec) |
Project a given vector onto basis. More... | |
void | combine (cartesian_t &vec, cartesian_t &res) |
Combine the basis with given weights. More... | |
Simple class to store three-dimensional basis vectors.
Geocentric TCN constructor.
[in] | p | position vector |
[in] | v | velocity vector |
|
inline |
Combine the basis with given weights.
[in] | vec | 3D vector to use as weights |
[out] | res | 3D vector output |
\[ res = \sum_{i=0}^2 vec[i] \cdot x_i \]
Project a given vector onto basis.
[in] | vec | 3D vector to project |
[out] | res | 3D vector output |
\[ res_i = (x_i \cdot vec) \]