// 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 Liam Girdwood 2003

#ifndef _GRID_HH
#define _GRID_HH

#include <vector>
#include <glibmm/ustring.h>

/*! \namespace Vega
* \brief Nova Virtual Sky Engine
*/
namespace Vega
{

	
/*! \class Grid
*
* Virtual Sky Grid
* 	
*/
class Grid
{
	public:
		Grid();
		~Grid();
	
		/*! \fn void clip(double ra_min, double dec_min, double ra_max , double dec_max);
		* \brief clip detailed (<5 deg size) grid sections.
		*/
		void clip(double ra_min, double dec_min, double ra_max , double dec_max);
	
		struct GridLine {
			double x1,y1;
			double x2,y2;
		};			
	
	private:
	
		double get_stepsize ();
		
		double m_min_ra;
		double m_min_dec;
		double m_max_ra;
		double m_max_dec;
		double m_ra_fov;
		
	public:
		int get_ra_lines (std::vector<GridLine>& ra_lines, bool overlap = false);
		int get_dec_lines (std::vector<GridLine>& dec_lines);
		int get_labelling (std::vector<GridLine>& posn, std::vector<Glib::ustring>& value);
		
};

};

#endif


syntax highlighted by Code2HTML, v. 0.9.1