format
typescript
Bounds.EncapsulatePoint(point)class: Bounds
description
Expands the bounding box to include the specified coordinate point.
This method expands the existing bounding box to include a new point, ensuring that the entire group of elements is contained within it. This is useful for dynamically expanding the bounding box to accommodate new elements in a dynamic scene.
parameter
| param_name | type | description |
|---|---|---|
| point | Vector3 | The specified coordinate point. |
reture
| type | description |
|---|---|
void |
code example
typescript
let bounds = new Bounds(new Vector3(1, 1, 1), new Vector3(2, 2, 2));
bounds.EncapsulatePoint(new Vector3(3, 3, 3));