public static Bounds SnapInward(this Bounds bounds, float inwardOffset = 0.0f) { return(BoundsEx.NewByMinAndMax( min: (bounds.min + inwardOffset.ToVector3()).Ceil(), max: (bounds.max - inwardOffset.ToVector3()).Floor() )); }
//============================================================ public static Bounds WithThickness(this Bounds bounds, float thickness = 0.01f) { return(BoundsEx.NewByMinAndMax(bounds.min, new Vector3(bounds.max.x, bounds.max.y + thickness, bounds.max.z))); }
public static Bounds GetTopBounds(this Bounds bounds) { return(BoundsEx.NewByMinAndMax(new Vector3(bounds.min.x, bounds.max.y, bounds.min.z), bounds.max)); }
//============================================================ public static Bounds GetButtonBounds(this Bounds bounds) { return(BoundsEx.NewByMinAndMax(bounds.min, new Vector3(bounds.max.x, bounds.min.y, bounds.max.z))); }