Пример #1
0
 /// <summary>
 /// Creates box from 2 points which need not be Min and Max.
 /// </summary>
 public static Box3 FromPoints(Vector3 p0, Vector3 p1)
 {
     return(new Box3(VectorComparisonExtensions.ComponentMin(p0, p1), VectorComparisonExtensions.ComponentMax(p0, p1)));
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b"></param>
 /// <returns></returns>
 public static Box3 Intersection(Box3 a, Box3 b)
 {
     return(new Box3(VectorComparisonExtensions.ComponentMax(a.Min, b.Min), VectorComparisonExtensions.ComponentMin(a.Max, b.Max)));
 }