コード例 #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
ファイル: GeoTriangle.cs プロジェクト: Vanaheimr/Aegir
        /// <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
ファイル: GeoTriangle.cs プロジェクト: Vanaheimr/Aegir
        /// <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>();
 }