00001 #ifndef RIGGING_H
00002 #define RIGGING_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <vector>
00013 #include <QGLViewer/vec.h>
00014 #include "face.h"
00015
00016
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
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 inline bool Rigging::mollweide (void) const
00059 {
00060 return viewmoll;
00061 }
00062 #endif