rigging.h

Go to the documentation of this file.
00001 #ifndef RIGGING_H
00002 #define RIGGING_H
00003 /* ============================================================================
00004 'rigging.h' defines the rigging of the viewer.
00005 
00006 Written by Nicholas Phillips.
00007 QT4 adaption by Michael R. Greason, ADNET, 27 August 2007
00008 ============================================================================ */
00009 /*
00010                         Fetch header files.
00011 */
00012 #include <vector>
00013 #include <QGLViewer/vec.h>
00014 #include "face.h"
00015 /* ============================================================================
00016 'Rigging' manages the faces on the sky.
00017 ============================================================================ */
00018 class Rigging
00019 {
00020 protected:
00021         bool viewmoll;
00022         int  nside;
00023         std::vector<Face> faces;
00024         typedef std::vector<Face>::iterator FI;
00025         std::vector<double> costhetas_np;       
00026         std::vector<double> costhetas_eq;       
00027         std::vector<double> costhetas_sp;       
00028 
00029         void drawFace(const int face);
00030         void setThetas();
00031 public:
00032         Rigging();
00033         ~Rigging();
00034         
00035         void draw();
00036 
00037         void generate(int ns, bool mp, double rad = 1.);
00038 
00039         bool mollweide (void) const;
00040         bool projectSelection (const qglviewer::Vec &o, const qglviewer::Vec &d,
00041                 qglviewer::Vec &v) const;
00042         bool projectSelection (const qglviewer::Vec &o, const qglviewer::Vec &d,
00043                 double &phi, double &lambda) const;
00044 }; 
00045 /* ----------------------------------------------------------------------------
00046 'mollweide' indicates whether or not the rigging is configurated for a 
00047 Mollweide projection.
00048 
00049 Arguments:
00050         None.
00051 
00052 Returned:
00053         viewmoll - The results of the test:  true if the current projection is
00054                    the Mollweide projection.
00055 
00056 Written by Nicholas Phillips.
00057 ---------------------------------------------------------------------------- */
00058 inline bool Rigging::mollweide (void) const
00059 {
00060         return viewmoll;
00061 }
00062 #endif

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