GLAMERDOC++
Gravitational Lensing Code Library
Public Member Functions | Public Attributes | List of all members
Point_3d< T > Struct Template Reference

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_3doperator= (const Point_3d &p)
 
Point_3d operator+ (const Point_3d &p) const
 
Point_3d operator- (const Point_3d &p) const
 
Point_3doperator+= (const Point_3d &p)
 
Point_3doperator-= (const Point_3d &p)
 
Point_3doperator/= (T value)
 
Point_3d operator/ (T value) const
 
Point_3doperator*= (T value)
 
Point_3d operator* (PosType value) const
 
operator* (const Point_3d &p) const
 scalar product
 
Point_3d< T > operator^ (const Point_3d< T > &p) const
 outer product
 
length () const
 length
 
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

x [3]
 

Detailed Description

template<typename T = PosType>
struct Point_3d< T >

Class for representing points or vectors in 3 dimensions. Not that the dereferencing operator is overridden.

Member Function Documentation

◆ unitTheta()

template<typename T = PosType>
Point_3d<T> Point_3d< T >::unitTheta ( )
inline

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).


The documentation for this struct was generated from the following file: