Exemple #1
0
 public override int GetHashCode(SpatialEqualityOptions options)
 {
     unchecked
     {
         return(((Coordinate1 != null ? Coordinate1.GetHashCode(options) : 0) * 397) ^ (Coordinate2 != null ? Coordinate2.GetHashCode(options) : 0));
     }
 }
Exemple #2
0
        public AirSpace(Vector3D coordinate1 = null, Vector3D coordinate2 = null)
        {
            // Lower Bounds
            Coordinate1 = coordinate1 ?? new Vector3D(10000, 10000, 500);

            if (!Coordinate1.IsPositive())
            {
                throw new ArgumentException();
            }

            // Higher bounds
            Coordinate2 = coordinate2 ?? new Vector3D(90000, 90000, 20000);

            if (!Coordinate2.IsPositive())
            {
                throw new ArgumentException();
            }

            if ((Coordinate2.X <= Coordinate1.X) ||
                (Coordinate2.Y <= Coordinate1.Y) ||
                (Coordinate2.Z <= Coordinate1.Z))
            {
                throw new ArgumentException();
            }
        }
Exemple #3
0
 public override int GetHashCode(SpatialEqualityOptions options)
 {
     unchecked
     {
         int hashCode = (Coordinate1 != null ? Coordinate1.GetHashCode(options) : 0);
         hashCode = (hashCode * 397) ^ (Coordinate2 != null ? Coordinate2.GetHashCode(options) : 0);
         hashCode = (hashCode * 397) ^ Distance.GetHashCode();
         hashCode = (hashCode * 397) ^ Bearing12.GetHashCode();
         hashCode = (hashCode * 397) ^ Bearing21.GetHashCode();
         return(hashCode);
     }
 }
Exemple #4
0
 public Envelope GetBounds()
 {
     return(Coordinate1.GetBounds().Combine(Coordinate2.GetBounds()));
 }