-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathskyviewer.h
More file actions
114 lines (91 loc) · 2.95 KB
/
skyviewer.h
File metadata and controls
114 lines (91 loc) · 2.95 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#ifndef SKYVIEWER_H
#define SKYVIEWER_H
/* ============================================================================
'skyviewer.h' extends the QGLViewer class.
Written by Nicholas Phillips.
QT4 implementation. Michael R. Greason, ADNET, 29 December 2006.
============================================================================ */
/*
Fetch header files.
*/
#include <QGLViewer/qglviewer.h>
#include <QGLViewer/manipulatedCameraFrame.h>
#include <QMouseEvent>
#include "skytexture.h"
#include "rigging.h"
#include "polarargline.h"
class mainWindow;
/* ============================================================================
'SkyViewer' extends the QGLViewer class.
============================================================================ */
class SkyViewer : public QGLViewer
{
Q_OBJECT
protected:
qglviewer::CameraConstraint *constraint;
mainWindow *mwin;
float hlite;
float delhlite;
SkyTexture *texture;
Rigging *rigging;
Rigging *whiterig;
PolarArgLineSet *polar;
QColor whitecolor, blackcolor;
bool pulseflg;
bool mollview;
virtual void init(void);
virtual void draw(void);
virtual void animate (void);
virtual void postSelection (const QPoint &pt);
public :
SkyViewer(QWidget *parent, mainWindow *mw);
virtual ~SkyViewer ();
void setTexture (SkyTexture *t);
void setRigging (Rigging *r);
void setWhiteRigging (Rigging *r);
void setPolarAngles (PolarArgLineSet *p);
void constrainMollweide (bool b);
void recenterAt(const double theta, const double phi);
void recenterAt(const double x, const double y, const double z);
virtual QString helpString () const;
};
/* ----------------------------------------------------------------------------
'setRigging' assigns the rigging to be used.
Arguments:
r - The new rigging.
Returned:
None.
Written by Nicholas Phillips.
QT4 implementation. Michael R. Greason, ADNET, 28 August 2007.
---------------------------------------------------------------------------- */
inline void SkyViewer::setRigging(Rigging *r)
{
rigging = r;
}
/* ----------------------------------------------------------------------------
'setWhiteRigging' assigns the rigging of the underlying white image to be used.
Arguments:
r - The new rigging.
Returned:
None.
Written by Nicholas Phillips.
QT4 implementation. Michael R. Greason, ADNET, 28 August 2007.
---------------------------------------------------------------------------- */
inline void SkyViewer::setWhiteRigging(Rigging *r)
{
whiterig = r;
}
/* ----------------------------------------------------------------------------
'setPolarAngles' assigns the polarization angles to be displayed.
Arguments:
p - The polarization angles.
Returned:
None.
Written by Nicholas Phillips.
QT4 implementation. Michael R. Greason, ADNET, 28 August 2007.
---------------------------------------------------------------------------- */
inline void SkyViewer::setPolarAngles(PolarArgLineSet *p)
{
polar = p;
}
#endif