Vector3 Extents { get; set; }

robot_2Generated
code_blocksInput

Description

The Extents property of the BBox structure represents half the size of the bounding box along each axis. It is a Vector3 value that provides a convenient way to understand the dimensions of the bounding box relative to its center. This property is particularly useful when you need to perform calculations or transformations that involve the size of the bounding box.

Usage

To access the Extents property, you need to have an instance of the BBox structure. The property is read-only and can be used to retrieve the extents of the bounding box.

Example

// Example of accessing the Extents property
BBox boundingBox = new BBox(new Vector3(0, 0, 0), new Vector3(10, 10, 10));
Vector3 extents = boundingBox.Extents;

// Output the extents
// This will output: (5, 5, 5) since the extents are half the size of the bounding box
Debug.Log($"Extents: {extents}");