// This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Copyright 2003 Liam Girdwood #ifndef _CONSTELLATION_HH #define _CONSTELLATION_HH #include #include #define NUM_CONSTEL 89 #define NUM_CONST_LINES 646 #define NUM_CONST_BOUND 357 /*! \namespace Vega * \brief Nova Virtual Sky Engine */ namespace Vega { /*! \class Constellation * \brief Manages constellation boundaries, lines and names */ class Constellation { public: Constellation(); ~Constellation(); /*! \fn void clip(double ra_min, double dec_min, double ra_max , double dec_max); * \brief Clip the constellation objects */ void clip(double ra_min, double dec_min, double ra_max , double dec_max); /*! \fn const Glib::ustring& get_constellation(double ra, double dec); * \brief Get the constellation name at position ra,dec */ const Glib::ustring& get_constellation(double ra, double dec); /*! \enum const_id * \brief Constellation ID's */ enum const_id { AND = 0, ANT, APS, AQR, AQL, ARA, ARG, ARI, AUR, BOO, CAE, CAM, CNC, CVN, CMA, CMI, CAP, CAR, CAS, CEN, CEP, CET, CHA, CIR, COL, COM, CRA, CRB, CRV, CRT, CRU, CYG, DEL, DOR, DRA, EQU, ERI, FOR, GEM, GRU, HER, HOR, HYA, HYI, IND, LAC, LEO, LMI, LEP, LIB, LUP, LYN, LYR, MEN, MIC, MON, MUS, NOR, OCT, OPH, ORI, PAV, PEG, PER, PHE, PIC, PSC, PSA, PUP, PYX, RET, SGE, SGR, SCO, SCL, SCT, SER, SEX, TAU, TEL, TRI, TRA, TUC, UMA, UMI, VEL, VIR, VOL, VUL }; struct ConstName { const_id id; const char* abv; const char* nominative; const char* genitive; }; struct ConstLine { const_id id; double ra1; double dec1; double ra2; double dec2; }; struct ConstBound { const_id id; double ra1; double ra2; double dec1; }; int get_lines (std::vector& lines); int get_names (std::vector& names); int get_bounds (std::vector& boundaries); private: double m_min_ra; double m_min_dec; double m_max_ra; double m_max_dec; static ConstName const_names[NUM_CONSTEL]; static ConstLine const_lines[NUM_CONST_LINES]; static ConstBound const_bounds[NUM_CONST_BOUND]; }; }; #endif