/// <summary> /// 获取两个范围的交集 /// </summary> public Bound3 GetIntersection(Bound3 other) { other.x = x.GetIntersection(other.x); other.y = y.GetIntersection(other.y); other.z = z.GetIntersection(other.z); return other; }
/// <summary> /// 扩展以包含指定范围 /// </summary> public void Encapsulate(Bound3 other) { x.Encapsulate(other.x); y.Encapsulate(other.y); z.Encapsulate(other.z); }
/// <summary> /// 判断是否与另一范围有交集 /// </summary> public bool Intersects(Bound3 other) { return x.Intersects(other.x) && y.Intersects(other.y) && z.Intersects(other.z); }