Exemplo n.º 1
0
 public bool Equals(Extents e)
 {
     if (this.IsEmpty() || e.IsEmpty())
     {
         return(this.IsEmpty() && e.IsEmpty());
     }
     return(this.Min.Value.Equals(e.Min.Value) && this.Max.Value.Equals(e.Max.Value));
 }
Exemplo n.º 2
0
 public Extents Add(Extents e)
 {
     if (this.IsEmpty())
     {
         return(e.Copy());
     }
     else if (e.IsEmpty())
     {
         return(this.Copy());
     }
     return(Extents.Create(
                Math.Min(this.Min.Value.X, e.Min.Value.X), Math.Max(this.Max.Value.X, e.Max.Value.X),
                Math.Min(this.Min.Value.Y, e.Min.Value.Y), Math.Max(this.Max.Value.Y, e.Max.Value.Y),
                Math.Min(this.Min.Value.Z, e.Min.Value.Z), Math.Max(this.Max.Value.Z, e.Max.Value.Z)));
 }