예제 #1
0
 public TriCircle(GeoTriangle Triangle)
 {
     this.Triangle = Triangle;
     this.Circle   = new GeoCircle(Triangle.P1,
                                   Triangle.P2,
                                   Triangle.P3);
     this.Neighbors = new List <TriCircle>();
 }
예제 #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ITriangle">An object to compare with.</param>
        public Int32 CompareTo(GeoTriangle ITriangle)
        {
            if ((Object)ITriangle == null)
            {
                throw new ArgumentNullException("The given triangle must not be null!");
            }

            // Compare the x-coordinate of the circumcenter
            var _Result = CircumCenter.Longitude.CompareTo(ITriangle.CircumCenter.Longitude);

            // If equal: Compare the y-coordinate of the circumcenter
            if (_Result == 0)
            {
                _Result = this.CircumCenter.Latitude.CompareTo(ITriangle.CircumCenter.Latitude);
            }

            return(_Result);
        }
예제 #3
0
        /// <summary>
        /// Compares two triangles for equality.
        /// </summary>
        /// <param name="ITriangle">A triangle to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(GeoTriangle ITriangle)
        {
            if ((Object)ITriangle == null)
            {
                return(false);
            }

            return((this.P1.Equals(ITriangle.P1) &&
                    this.P2.Equals(ITriangle.P2) &&
                    this.P3.Equals(ITriangle.P3)) ||

                   (this.P1.Equals(ITriangle.P2) &&
                    this.P2.Equals(ITriangle.P3) &&
                    this.P3.Equals(ITriangle.P1)) ||

                   (this.P1.Equals(ITriangle.P3) &&
                    this.P2.Equals(ITriangle.P1) &&
                    this.P3.Equals(ITriangle.P2)));
        }
예제 #4
0
        /// <summary>
        /// Compares two triangles for equality.
        /// </summary>
        /// <param name="ITriangle">A triangle to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(GeoTriangle ITriangle)
        {
            if ((Object)ITriangle == null)
                return false;

            return (this.P1.Equals(ITriangle.P1) &&
                    this.P2.Equals(ITriangle.P2) &&
                    this.P3.Equals(ITriangle.P3)) ||

                   (this.P1.Equals(ITriangle.P2) &&
                    this.P2.Equals(ITriangle.P3) &&
                    this.P3.Equals(ITriangle.P1)) ||

                   (this.P1.Equals(ITriangle.P3) &&
                    this.P2.Equals(ITriangle.P1) &&
                    this.P3.Equals(ITriangle.P2));
        }
예제 #5
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ITriangle">An object to compare with.</param>
        public Int32 CompareTo(GeoTriangle ITriangle)
        {
            if ((Object)ITriangle == null)
                throw new ArgumentNullException("The given triangle must not be null!");

            // Compare the x-coordinate of the circumcenter
            var _Result = CircumCenter.Longitude.CompareTo(ITriangle.CircumCenter.Longitude);

            // If equal: Compare the y-coordinate of the circumcenter
            if (_Result == 0)
                _Result = this.CircumCenter.Latitude.CompareTo(ITriangle.CircumCenter.Latitude);

            return _Result;
        }
예제 #6
0
파일: Maths.cs 프로젝트: Vanaheimr/Aegir
 public TriCircle(GeoTriangle Triangle)
 {
     this.Triangle   = Triangle;
     this.Circle     = new GeoCircle(Triangle.P1,
                                     Triangle.P2,
                                     Triangle.P3);
     this.Neighbors  = new List<TriCircle>();
 }
예제 #7
0
파일: Maths.cs 프로젝트: Vanaheimr/Aegir
 public TriCircle(GeoTriangle Triangle, GeoCircle Circle)
 {
     this.Triangle   = Triangle;
     this.Circle     = Circle;
     this.Neighbors  = new List<TriCircle>();
 }
예제 #8
0
 public TriCircle(GeoTriangle Triangle, GeoCircle Circle)
 {
     this.Triangle  = Triangle;
     this.Circle    = Circle;
     this.Neighbors = new List <TriCircle>();
 }