Exemplo n.º 1
0
 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()
                ));
 }
Exemplo n.º 2
0
 //============================================================
 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)));
 }
Exemplo n.º 3
0
 public static Bounds GetTopBounds(this Bounds bounds)
 {
     return(BoundsEx.NewByMinAndMax(new Vector3(bounds.min.x, bounds.max.y, bounds.min.z), bounds.max));
 }
Exemplo n.º 4
0
 //============================================================
 public static Bounds GetButtonBounds(this Bounds bounds)
 {
     return(BoundsEx.NewByMinAndMax(bounds.min, new Vector3(bounds.max.x, bounds.min.y, bounds.max.z)));
 }