The Grow
method of the BBox
struct is used to expand the bounding box by a specified amount, referred to as "skin". This method returns a new BBox
instance that represents the expanded bounding box.
The Grow
method of the BBox
struct is used to expand the bounding box by a specified amount, referred to as "skin". This method returns a new BBox
instance that represents the expanded bounding box.
To use the Grow
method, you need to provide a reference to a float
value that specifies the amount by which the bounding box should be expanded. The method will return a new BBox
that is larger by the specified amount on all sides.
// Example of using the Grow method BBox originalBox = new BBox(new Vector3(0, 0, 0), new Vector3(1, 1, 1)); float skin = 0.5f; BBox expandedBox = originalBox.Grow(ref skin); // expandedBox now represents a bounding box that is larger by 0.5 units on all sides.