Skip to content

format

typescript
Bounds.SetMinMax(min, max)

class: Bounds

description

Set the minimum and maximum values of the bounding box.

This method allows you to directly modify the position and size of an existing bounding box without creating a new bounding box object. This is useful for dynamically adjusting the position or size of the bounding box.

parameter

param_nametypedescription
minVector3The minimum value.
maxVector3The maximum value.

reture

typedescription
void

code example

typescript
let bounds = new Bounds(new Vector3(1, 1, 1), new Vector3(1, 1, 1));
bounds.setMinMax(new Vector3(1, 1, 1), new Vector3(2, 2, 2));