#region Written by Tamas Budavari (budavari@jhu.edu)
/**
 * SphericalLib.Const
 * 
 * SphericalLib is a .NET library to deal with geometry on the unit sphere.
 * It is intented to be used for complex survey footprint descriptions in
 * standalone applications as well as in web services and perhaps Yukon.
 * 
 * Written by Tamas Budavari (budavari@jhu.edu)
 * See bottom of file for revision history
 * 
 * Current revision:
 *   ID:          $Id: Const.cs,v 1.1.1.1 2006/11/14 02:56:39 gupchup Exp $
 *   Revision:    $Revision: 1.1.1.1 $
 *   Date:        $Date: 2006/11/14 02:56:39 $
 */
using System;
#endregion

namespace Spherical
{
    #region Enumeration definitions

    /// <summary>
    /// Extended sign is for convexes (and halfspaces)
    /// </summary>
    public enum ESign { Zero, Positive, Negative, Mixed };

	/// <summary>
	/// PointOrder is crucial when defining polygons
	///   CCW           - points are counter-clockwise (CCW)
	///   CW    		- points are clockwise (CW)
	///   Safe          - points are safely ordered (CW or CCW)
	///   Random		- random points should run through convex hull 
	///					  (not implemented)
	/// </summary>
	public enum PointOrder { CCW, CW, Safe, Random };

	/// <summary>
	/// Status flag of a root
	/// </summary>
	public enum RootStatus { Any, Unknown, Inside, Outside, Edge };

    #endregion
    #region Static constant class Const

    /// <summary>
	/// Class holds some constants
	/// </summary>
	public static class Const
	{
        public static readonly int MaximumIteration = 1000;
        public static readonly double Tolerance = 1e-10;

		// Attributes of static fields in safe assemblies must be marked  readonly in Visual C#

        public const double Epsilon = 1e-15;
		public const double Degree2Radian = Math.PI/180; 
		public const double Radian2Degree = 1/Degree2Radian;
		public const double Arcmin2Radian = Degree2Radian/60;
		public const double Radian2Arcmin = 1/Arcmin2Radian;
		public const double SquareRadian2SquareDegree = Radian2Degree*Radian2Degree;
        public const double WholeSphereInSquareDegree = 4 * Math.PI * SquareRadian2SquareDegree;

        public static readonly string Version = "SphericalLib v0.1";
        public const string NameSpace = "ivo://voservices.org/region";

		/// <summary>
		/// Revision from CVS
		/// </summary>
		public static string Revision
		{
			get	{ return "$Revision: 1.1.1.1 $"; }
		}
    }
    #endregion
}

#region Revision History
/* Revision History

        $Log: Const.cs,v $
        Revision 1.1.1.1  2006/11/14 02:56:39  gupchup
        no message

        Revision 1.5  2006/04/24 15:18:33  budavari
        Tolerance 1e-13 was too small, back to 1e-10

        Revision 1.4  2006/03/31 15:27:00  budavari
        small additions and typo fix

        Revision 1.3  2006/03/08 19:49:08  gyuri
        Attributes of static fields in safe assemblies must be marked  readonly in Visual C#

        Revision 1.2  2006/02/28 16:26:59  budavari
        Major revision: public properties

        Revision 1.1  2006/01/24 15:56:05  budavari
        Re-structured directory layout to accommodate more projects

        Revision 1.16  2006/01/19 17:27:10  budavari
        Extended sign enum added

        Revision 1.15  2005/12/02 15:02:57  budavari
        RootStatus.Any and Const.Epsilon=1e-15 added

        Revision 1.14  2005/11/30 21:13:09  budavari
        Surface of unit sphere in sq deg added to constants

        Revision 1.13  2005/11/30 20:55:39  budavari
        Cosmetics... #region specifications etc added

        Revision 1.12  2005/11/30 15:55:06  budavari
        Doc added

        Revision 1.11  2005/11/30 15:32:37  budavari
        Header changes

        Revision 1.10  2005/11/29 14:01:19  budavari
        Some default values changed...

        Revision 1.9  2005/11/24 16:27:16  budavari
        Region areas compared to SQL code and releated fixes of degenerate arcs.
        Looking good except maybe for one patch (convex 0) of the 'footprint',
        which has 2 degenerate triangles and patch area changes when shifting
        pivot point.

        Revision 1.8  2005/11/18 05:58:09  budavari
        Working on boolean operations on regions...

        Revision 1.7  2005/11/17 01:58:54  budavari
        Done with the convex stuff... Hurray!!! It can even deal with the "orange
        slices" to some extent: the problem is the area - coming up next...

        Revision 1.6  2005/11/16 18:56:59  budavari
        Only degenerate roots are missing... Also added sample convex static class.

        Revision 1.5  2005/11/15 22:20:20  budavari
        Using Generics - almost there

        Revision 1.4  2005/11/15 15:25:36  budavari
        Everything is a class, things are coming together for area computation, etc. Will moved to C# 2.0

        Revision 1.3  2005/11/04 22:49:36  budavari
        Re-write to have Point and Halfspace as struct again and other tinkerings. XML is still fine...

        Revision 1.2  2005/11/03 15:22:01  budavari
        Fairly major revision to make sure the objects serialize to XML nicely:
          - Added separate containers of halfspaces and convexes
          - Customized XML output for compactness and friendly proxy interface
          - Implemented simple .Parse() methods taking cartesion representation

        Revision 1.1.1.1  2005/10/28 14:13:43  budavari
        Initial import of the SphericalLib library. It is pretty complete in terms
        of the classes but lacking the simplication and other advanced methods.
		
*/
#endregion