Vector3 Extents { get; set; }

book_4_sparkGenerated
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();
Vector3 extents = boundingBox.Extents;

// Use the extents for calculations
Vector3 halfSize = extents; // This is half the size of the bounding box

// Example of using extents in a transformation
Vector3 newPosition = boundingBox.Center + extents;