Threepp.Box2¶
2D axis-aligned bounding box class
Members¶
Constructors¶
Properties¶
Methods¶
- set
- clone
- copy
- makeEmpty
- isEmpty
- expandByPoint
- expandByVector
- expandByScalar
- containsPoint
- containsBox
- intersectsBox
- distanceToPoint
- intersect
- union_
- translate
- equals
Box2¶
Constructor
Arguments
| Arguments | Default | Description |
|---|---|---|
min |
|
Lower bound (Vector2). |
max |
|
Upper bound (Vector2). |
Description
Constructor
min¶
Property \ Access: r/w
Description
Lower bound (read-only)
max¶
Property \ Access: r/w
Description
Upper bound (read-only)
set¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
min |
|
|
max |
|
Description
Sets the values
clone¶
Method
Description
Clones the box
copy¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Copies another box
makeEmpty¶
Method
Description
Makes the box empty
isEmpty¶
Method
Description
Whether the box is empty
expandByPoint¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
point |
|
Description
Expands the box to include a point
expandByVector¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
v |
|
Description
Expands the box by a vector
expandByScalar¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
s |
|
Description
Expands the box by a scalar
containsPoint¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
point |
|
Description
Whether the box contains a point
containsBox¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Whether the box contains another box
intersectsBox¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Whether the box intersects another box
distanceToPoint¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
point |
|
Description
Distance to a point
intersect¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Gets the intersection
union_¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Union
translate¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
offset |
|
Description
Translates the box
equals¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
box |
|
Description
Equality test