Beispiel #1
0
 public TriCircle(GeoTriangle Triangle)
 {
     this.Triangle = Triangle;
     this.Circle   = new GeoCircle(Triangle.P1,
                                   Triangle.P2,
                                   Triangle.P3);
     this.Neighbors = new List <TriCircle>();
 }
Beispiel #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);
        }
Beispiel #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)));
        }
Beispiel #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));
        }
Beispiel #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;
        }
Beispiel #6
0
 public TriCircle(GeoTriangle Triangle)
 {
     this.Triangle   = Triangle;
     this.Circle     = new GeoCircle(Triangle.P1,
                                     Triangle.P2,
                                     Triangle.P3);
     this.Neighbors  = new List<TriCircle>();
 }
Beispiel #7
0
 public TriCircle(GeoTriangle Triangle, GeoCircle Circle)
 {
     this.Triangle   = Triangle;
     this.Circle     = Circle;
     this.Neighbors  = new List<TriCircle>();
 }
Beispiel #8
0
 public TriCircle(GeoTriangle Triangle, GeoCircle Circle)
 {
     this.Triangle  = Triangle;
     this.Circle    = Circle;
     this.Neighbors = new List <TriCircle>();
 }