LevelS C++ support library  3.83
Public Member Functions | Public Attributes | Related Functions | List of all members
pointing Class Reference

#include <pointing.h>

Public Member Functions

 pointing ()
 
 pointing (double Theta, double Phi)
 
 pointing (const vec3 &inp)
 
 operator vec3 () const
 
vec3 to_vec3 () const
 
void from_vec3 (const vec3 &inp)
 
void normalize_theta ()
 
void normalize ()
 

Public Attributes

double theta
 
double phi
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, const pointing &p)
 

Detailed Description

Class representing a direction in 3D space or a location on the unit sphere. All angles in radians.

Definition at line 43 of file pointing.h.

Constructor & Destructor Documentation

◆ pointing() [1/3]

pointing::pointing ( )
inline

Default constructor. theta and phi are not initialized.

Definition at line 52 of file pointing.h.

◆ pointing() [2/3]

pointing::pointing ( double  Theta,
double  Phi 
)
inline

Creates a pointing with Theta and Phi.

Definition at line 54 of file pointing.h.

◆ pointing() [3/3]

pointing::pointing ( const vec3 inp)
inline

Creates a pointing from the vector inp. inp need not be normalized.

Definition at line 59 of file pointing.h.

Member Function Documentation

◆ operator vec3()

pointing::operator vec3 ( ) const
inline

Returns a normalized vector pointing in the same direction.

Definition at line 63 of file pointing.h.

◆ to_vec3()

vec3 pointing::to_vec3 ( ) const

Returns a normalized vector pointing in the same direction.

Definition at line 38 of file pointing.cc.

◆ from_vec3()

void pointing::from_vec3 ( const vec3 inp)

Converts inp to ptg. inp need not be normalized.

Definition at line 43 of file pointing.cc.

◆ normalize_theta()

void pointing::normalize_theta ( )

Changes the angles so that 0<=theta<=pi.

Definition at line 49 of file pointing.cc.

◆ normalize()

void pointing::normalize ( )

Changes the angles so that 0<=theta<=pi and 0<=phi<2*pi.

Definition at line 58 of file pointing.cc.

Member Data Documentation

◆ theta

double pointing::theta

Colatitude of the pointing (i.e. the North pole is at theta=0).

Definition at line 47 of file pointing.h.

◆ phi

double pointing::phi

Longitude of the pointing.

Definition at line 49 of file pointing.h.


The documentation for this class was generated from the following files:

Generated on Wed Nov 13 2024 12:18:16 for LevelS C++ support library