The SpatialVector is a 3D vector usually living on the surface of the sphere
![]() | SpatialVector () constructs (1,0,0), ra=0, dec=0. |
![]() | SpatialVector (float64 x, float64 y, float64 z) Constructor from three coordinates, not necessarily normed to 1 |
![]() | SpatialVector (float64 ra, float64 dec) Constructor from ra/dec, this is always normed to 1 |
![]() | SpatialVector (const SpatialVector &) Copy constructor |
![]() | operator = (const SpatialVector &) Assignment |
![]() | set (const float64 &x, const float64 &y, const float64 &z) Set member function: set values - always normed to 1 |
![]() | set (const float64 &ra, const float64 &dec) Set member function: set values - always normed to 1 |
![]() | get ( float64 &x, float64 &y, float64 &z) const Get x,y,z |
![]() | get ( float64 &ra, float64 &dec) Get ra,dec - normalizes x,y,z |
![]() | length () const return length of vector |
![]() | x () const return x (only as rvalue) |
![]() | y () const return y |
![]() | z () const return z |
![]() | ra () return ra - this norms the vector to 1 if not already done so |
![]() | dec () return dec - this norms the vector to 1 if not already done so |
![]() | normalize () Normalize vector length to 1 |
![]() | show () const Printf it to stdout |
![]() | read (istream &) Read vector from a stream |
![]() | write (ostream &) const Write vector to a stream |
![]() | operator == (const SpatialVector & ) const Comparison |
![]() | operator * (const SpatialVector & ) const dot product |
![]() | operator ^ (const SpatialVector & ) const cross product |
![]() | operator + (const SpatialVector & ) const addition |
![]() | operator - (const SpatialVector & ) const subtraction |
![]() | Scalar products with int and float
|
The SpatialVector is a 3D vector usually living on the surface of the sphere. The corresponding ra, dec can be obtained if the vector has unit length. That can be ensured with the normalize() function.
SpatialVector(float64 x, float64 y, float64 z)
SpatialVector(float64 ra, float64 dec)
SpatialVector(const SpatialVector &)
SpatialVector& operator =(const SpatialVector &)
void set(const float64 &x, const float64 &y, const float64 &z)
void set(const float64 &ra, const float64 &dec)
void get( float64 &x, float64 &y, float64 &z) const
void get( float64 &ra, float64 &dec)
float64 length() const
float64 x() const
float64 y() const
float64 z() const
float64 ra()
float64 dec()
void normalize()
void show() const
void read(istream &)
void write(ostream &) const
int operator ==(const SpatialVector & ) const
float64 operator *(const SpatialVector & ) const
SpatialVector operator ^(const SpatialVector & ) const
SpatialVector operator +(const SpatialVector & ) const
SpatialVector operator -(const SpatialVector & ) const
alphabetic index hierarchy of classes