-
Notifications
You must be signed in to change notification settings - Fork 4
/
rigging.h
62 lines (54 loc) · 1.83 KB
/
rigging.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
52
53
54
55
56
57
58
59
60
61
62
#ifndef RIGGING_H
#define RIGGING_H
/* ============================================================================
'rigging.h' defines the rigging of the viewer.
Written by Nicholas Phillips.
QT4 adaption by Michael R. Greason, ADNET, 27 August 2007
============================================================================ */
/*
Fetch header files.
*/
#include <vector>
#include <QGLViewer/vec.h>
#include "face.h"
/* ============================================================================
'Rigging' manages the faces on the sky.
============================================================================ */
class Rigging
{
protected:
bool viewmoll;
int nside;
std::vector<Face> faces;
typedef std::vector<Face>::iterator FI;
std::vector<double> costhetas_np; //!< theta values for North Pole Faces
std::vector<double> costhetas_eq; //!< theta values for Equatorial Pole Faces
std::vector<double> costhetas_sp; //!< theta values for South Pole Faces
void drawFace(const int face);
void setThetas();
public:
Rigging();
~Rigging();
void draw();
void generate(int ns, bool mp, double rad = 1.);
bool mollweide (void) const;
bool projectSelection (const qglviewer::Vec &o, const qglviewer::Vec &d,
qglviewer::Vec &v) const;
bool projectSelection (const qglviewer::Vec &o, const qglviewer::Vec &d,
double &phi, double &lambda) const;
};
/* ----------------------------------------------------------------------------
'mollweide' indicates whether or not the rigging is configurated for a
Mollweide projection.
Arguments:
None.
Returned:
viewmoll - The results of the test: true if the current projection is
the Mollweide projection.
Written by Nicholas Phillips.
---------------------------------------------------------------------------- */
inline bool Rigging::mollweide (void) const
{
return viewmoll;
}
#endif