GLAMERDOC++
Gravitational Lensing Code Library
|
Class for representing points or vectors in 3 dimensions. Not that the dereferencing operator is overridden. More...
#include <point.h>
Public Member Functions | |
Point_3d (T xx, T yy, T zz) | |
Point_3d (const Point_3d &p) | |
Point_3d & | operator= (const Point_3d &p) |
Point_3d | operator+ (const Point_3d &p) const |
Point_3d | operator- (const Point_3d &p) const |
Point_3d & | operator+= (const Point_3d &p) |
Point_3d & | operator-= (const Point_3d &p) |
Point_3d & | operator/= (T value) |
Point_3d | operator/ (T value) const |
Point_3d & | operator*= (T value) |
Point_3d | operator* (PosType value) const |
T | operator* (const Point_3d &p) const |
scalar product | |
Point_3d< T > | operator^ (const Point_3d< T > &p) const |
outer product | |
T | length () const |
length | |
T | length_sqr () const |
void | rotate (T theta, T phi) |
a rotation theta around the z-axis followed by a rotation phi around the y-axis | |
void | unitize () |
rescale to make a unit length vector | |
Point_3d< T > | unitPhi () |
returns the unit vector in the direction of the right handed spherical coordinate Phi | |
Point_3d< T > | unitTheta () |
T * | data () |
T & | operator[] (size_t i) |
const T & | operator[] (size_t i) const |
Public Attributes | |
T | x [3] |
Class for representing points or vectors in 3 dimensions. Not that the dereferencing operator is overridden.
returns the unit vector in the direction of the right handed spherical coordinate Theta, Theta= pi/2 is the north pole and Theta=0 is the equater (z=0).