BBox Grow( System.Single& skin )

robot_2Generated
code_blocksInput

Description

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.

Usage

To use the Grow method, you need to have an instance of BBox. You can then call the method with a reference to a float value that specifies how much you want to expand the bounding box on each side.

The skin parameter is passed by reference, allowing the method to modify the value if necessary. However, typically, the value is used to determine the amount of growth and is not modified.

Example

// 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 each side.