-
Notifications
You must be signed in to change notification settings - Fork 4
/
polarargline.h
51 lines (50 loc) · 1.56 KB
/
polarargline.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef POLARARGLINE_H
#define POLARARGLINE_H
/* ============================================================================
'polarargline.h' defines the polarization angle vectors.
Written by Nicholas Phillips.
QT4 adaption by Michael R. Greason, ADNET, 27 August 2007
============================================================================ */
/*
Fetch header files.
*/
#include <vector>
#include <QGLViewer/vec.h>
#include "healpixmap.h"
typedef unsigned char uchar;
/* ============================================================================
'PolarArgLine' manages a single polarization angle vector on the viewer.
============================================================================ */
class PolarArgLine
{
protected:
bool on;
bool moll;
qglviewer::Vec v1;
qglviewer::Vec v2;
qglviewer::Vec col;
public:
PolarArgLine (void);
void set(double theta, double phi, double gamma, double size);
void setColor(uchar r_ = 255, uchar g_ = 255, uchar b_ = 255);
void setOn(bool b) { on = b;}
bool isOn() const { return on; };
void setMollweide (bool b) { moll = b; }
void draw();
};
/* ============================================================================
'PolarArgLineSet' manages a set of polarization angle vectors.
============================================================================ */
class PolarArgLineSet: public std::vector<PolarArgLine>
{
protected:
bool on;
public:
PolarArgLineSet (void);
void set(HealpixMap *skymap);
void setOn(bool b) { on = b;}
bool isOn() const { return on; };
void setMollweide (bool b);
void draw();
};
#endif