Constructor
new Box2(min, max)
Parameters:
Name | Type | Description |
---|---|---|
min | t3d. | (optional) Vector2 representing the lower (x, y) boundary of the box. Default is ( + Infinity, + Infinity ). |
max | t3d. | (optional) Vector2 representing the upper (x, y) boundary of the box. Default is ( - Infinity, - Infinity ). |
Methods
clone() → {t3d.Box2}
Returns a new Box2 with the same min and max as this one.
Returns:
- Type:
- t3d.
Box2
copy(box) → {t3d.Box2}
Copies the min and max from box to this box.
Parameters:
Name | Type | Description |
---|---|---|
box | t3d. |
Returns:
- Type:
- t3d.
Box2
set(x1, y1, x2, y2)
Parameters:
Name | Type | Description |
---|---|---|
x1 | Number | |
y1 | Number | |
x2 | Number | |
y2 | Number |