skyviewer.h

Go to the documentation of this file.
00001 #ifndef SKYVIEWER_H
00002 #define SKYVIEWER_H
00003 /* ============================================================================
00004 'skyviewer.h' extends the QGLViewer class.
00005 
00006 Written by Nicholas Phillips.
00007 QT4 implementation.  Michael R. Greason, ADNET, 29 December 2006.
00008 ============================================================================ */
00009 /*
00010                         Fetch header files.
00011 */
00012 #include <QGLViewer/qglviewer.h>
00013 #include <QMouseEvent>
00014 #include "skytexture.h"
00015 #include "rigging.h"
00016 #include "polarargline.h"
00017 
00018 class mainWindow;
00019 /* ============================================================================
00020 'SkyViewer' extends the QGLViewer class.
00021 ============================================================================ */
00022 class SkyViewer : public QGLViewer
00023 {
00024     Q_OBJECT
00025 protected:
00026         qglviewer::CameraConstraint *constraint;
00027 
00028         mainWindow *mwin;
00029 
00030         float hlite;
00031         float delhlite;
00032 
00033         SkyTexture      *texture;
00034         Rigging         *rigging;
00035         Rigging         *whiterig;
00036         PolarArgLineSet *polar;
00037 
00038         QColor whitecolor, blackcolor;
00039         bool   pulseflg;
00040 
00041         bool mollview;
00042 
00043         virtual void init(void);
00044         virtual void draw(void);
00045         virtual void animate (void);
00046 
00047         virtual void postSelection (const QPoint &pt);
00048 public :
00049         SkyViewer(QWidget *parent, mainWindow *mw);
00050         virtual ~SkyViewer ();
00051 
00052         void setTexture      (SkyTexture      *t);
00053         void setRigging      (Rigging         *r);
00054         void setWhiteRigging (Rigging         *r);
00055         void setPolarAngles  (PolarArgLineSet *p);
00056 
00057         void constrainMollweide (bool b);
00058 
00059         void recenterAt(const double theta, const double phi); 
00060         void recenterAt(const double x, const double y, const double z); 
00061 
00062         virtual QString helpString () const;
00063 
00064 };
00065 /* ----------------------------------------------------------------------------
00066 'setRigging' assigns the rigging to be used.
00067 
00068 Arguments:
00069         r - The new rigging.
00070 
00071 Returned:
00072         None.
00073 
00074 Written by Nicholas Phillips.
00075 QT4 implementation.  Michael R. Greason, ADNET, 28 August 2007.
00076 ---------------------------------------------------------------------------- */
00077 inline void SkyViewer::setRigging(Rigging *r)
00078 {
00079         rigging = r;
00080 }
00081 /* ----------------------------------------------------------------------------
00082 'setWhiteRigging' assigns the rigging of the underlying white image to be used.
00083 
00084 Arguments:
00085         r - The new rigging.
00086 
00087 Returned:
00088         None.
00089 
00090 Written by Nicholas Phillips.
00091 QT4 implementation.  Michael R. Greason, ADNET, 28 August 2007.
00092 ---------------------------------------------------------------------------- */
00093 inline void SkyViewer::setWhiteRigging(Rigging *r)
00094 {
00095         whiterig = r;
00096 }
00097 /* ----------------------------------------------------------------------------
00098 'setPolarAngles' assigns the polarization angles to be displayed.
00099 
00100 Arguments:
00101         p - The polarization angles.
00102 
00103 Returned:
00104         None.
00105 
00106 Written by Nicholas Phillips.
00107 QT4 implementation.  Michael R. Greason, ADNET, 28 August 2007.
00108 ---------------------------------------------------------------------------- */
00109 inline void SkyViewer::setPolarAngles(PolarArgLineSet *p)
00110 {
00111         polar = p;
00112 }
00113 #endif

Generated on Fri Feb 6 15:32:42 2009 for Skyviewer by  doxygen 1.4.7