|
| | Vector3 () |
| |
| | Vector3 (const T a, const T b, const T c) |
| |
| | Vector3 (const NumVector< T, 3 > rhs) |
| |
| | Vector3 (const NVector< T, 3 > rhs) |
| |
| const T | getx () const |
| |
| const T | gety () const |
| |
| const T | getz () const |
| |
| double | getxd () const |
| | Return x as a double. Useful with some versions of Python and long doubles. More...
|
| |
| double | getyd () const |
| |
| double | getzd () const |
| |
| void | setx (const T a) |
| |
| void | sety (const T b) |
| |
| void | setz (const T c) |
| |
| void | setxd (const double a) |
| | Set x with a double. Useful with some versions of Python and long doubles. More...
|
| |
| void | setyd (const double b) |
| |
| void | setzd (const double c) |
| |
| void | set (const T a, const T b, const T c) |
| |
| Vector3 | operator- () const |
| |
| Vector3 | operator+ (const Vector3 &rhs) const |
| |
| Vector3 | operator- (const Vector3 &rhs) const |
| |
| T | operator* (const Vector3 &rhs) const |
| |
| template<class U > |
| Vector3 | operator* (const U rhs) const |
| |
| template<class U > |
| Vector3 | operator/ (const U rhs) const |
| |
| Vector3 | cross (const Vector3 &rhs) const |
| | Cross product, \(\vec r \times \vec s \). More...
|
| |
| Vector3 | norm () const |
| |
| Vector3 & | operator-= (const Vector3 &rhs) |
| |
| Vector3 & | operator+= (const Vector3 &rhs) |
| |
| template<class U > |
| Vector3 & | operator*= (const U rhs) |
| |
| template<class U > |
| Vector3 & | operator/= (const U rhs) |
| |
| | ~Vector3 () |
| |
| template<class U > |
| Vector3< T > & | operator*= (const U rhs) |
| |
| template<class U > |
| Vector3< T > & | operator/= (const U rhs) |
| |
| | NumVector () |
| |
| | NumVector (const NVector< T, N > &rhs) |
| |
| | NumVector (const T rhs[N]) |
| |
| T | dot (const NumVector &other) const |
| | Inner product. More...
|
| |
| T | sq () const |
| |
| T | mag () const |
| | The square of the vector, \(\vec r^2 \). More...
|
| |
| T | distance (const NumVector &rhs) const |
| | The magnitude of the vector, \( \left| \vec r \right| \). More...
|
| |
| NumVector | perpto (const NumVector &other) const |
| |
| void | normalize () |
| | Normalize in place. More...
|
| |
| NumVector | norm () const |
| | Return the normalized version. More...
|
| |
| | ~NumVector () |
| |
| | NVector () |
| |
| | NVector (const NVector &rhs) |
| |
| template<class U > |
| | NVector (const NVector< U, N > &rhs) |
| |
| | NVector (const T locs[N]) |
| |
| const T & | get (const unsigned int n) const |
| |
| void | set (const unsigned int n, const T a) |
| |
| unsigned int | len () const |
| |
| NVector & | operator+= (const NVector &rhs) |
| |
| NVector & | operator-= (const NVector &rhs) |
| |
| template<class U > |
| NVector & | operator*= (const U rhs) |
| |
| template<class U > |
| NVector & | operator/= (const U rhs) |
| |
| NVector | operator- () const |
| |
| NVector | operator+ (const NVector &rhs) const |
| |
| NVector | operator- (const NVector &rhs) const |
| |
| T & | operator[] (const unsigned int i) |
| |
| const T & | operator[] (const unsigned int i) const |
| |
| template<class U > |
| NVector | operator* (const U rhs) const |
| | Multiplication by a scalar. More...
|
| |
| template<class U > |
| NVector | operator/ (const U rhs) const |
| | Division by a scalar. More...
|
| |
| T * | begin () |
| |
| T * | end () |
| |
| | ~NVector () |
| |
| template<class U > |
| NVector< T, N > & | operator*= (const U rhs) |
| |
| template<class U > |
| NVector< T, N > & | operator/= (const U rhs) |
| |
template<class T>
class Vector3< T >
A 3D physics vector, with methods for adding, subtracting, dot product, etc.
This is aliased as Vec when compiled with NDIM=3.
- Template Parameters
-
| T | a numerical type, as as float or double. |