public BoxParam(BoxParam param) { x = new PosClamp(param.x); y = new PosClamp(param.y); z = new PosClamp(param.z); points.AddRange(param.points); LargeSize = param.LargeSize; Ray = param.Ray; Center = new Vector3(param.Center.x, param.Center.y, param.Center.z); }
public float MinDistance(BoxParam other) { float distance = other.MinDistance(points[0]); for (int i = 1; i < points.Count; ++i) { distance = Mathf.Min(distance, other.MinDistance(points[i])); } return(distance); }
public bool IsAround(BoxParam other) { return(x.HasInContact(other.x) && y.HasInContact(other.y) && z.HasInContact(other.z)); }
public bool HasContact(BoxParam other) { return(x.HasContact(other.x) && y.HasContact(other.y) && z.HasContact(other.z)); }