Exemplo n.º 1
0
 /// <summary>
 /// Calculates whether this box contains another box
 /// </summary>
 /// <param name="other">The box.</param>
 /// <returns>True if this box contains the given box; False otherwise.</returns>
 /// <remarks>This does consider a box that touches the edge contained.</remarks>
 public bool Contains(Box3D <T> other)
 => Scalar.GreaterThanOrEqual(other.Min.X, this.Min.X) && Scalar.GreaterThanOrEqual(other.Min.Y, this.Min.Y) &&
 Scalar.GreaterThanOrEqual(other.Min.Z, this.Min.Z) &&
 Scalar.LessThanOrEqual(other.Max.X, this.Max.X) && Scalar.LessThanOrEqual(other.Max.Y, this.Max.Y) &&
 Scalar.LessThanOrEqual(other.Max.Z, this.Max.Z);
Exemplo n.º 2
0
 /// <summary>Returns a boolean indicating whether the given Box3D is equal to this Box3D instance.</summary>
 /// <param name="other">The Box3D to compare this instance to.</param>
 /// <returns>True if the other Box3D is equal to this instance; False otherwise.</returns>
 public bool Equals(Box3D <T> other)
 {
     return(Min.Equals(other.Min) && Max.Equals(other.Max));
 }