Intersects
Tests whether two boxes overlap.
Node id bounds/intersects
The Intersects node outputs true if boxes a and b overlap, and false
if they are apart.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| a | BoundingBox | { topLeft: { x: 0, y: 0 }, bottomRight: { x: 0, y: 0 } } | |
| b | BoundingBox | { topLeft: { x: 0, y: 0 }, bottomRight: { x: 0, y: 0 } } |
Outputs
| Name | Type | Notes |
|---|---|---|
| intersects | boolean |
Behaviour
- Edges count. Boxes that only touch at an edge or a corner intersect.
- Inside counts. A box entirely inside the other intersects it.
- Defaults. Both inputs default to an empty box at the origin.
- Boxes, not shapes. Two circles whose boxes overlap at the corners intersect here, even if the circles don't touch.
Example
Two overlapping rectangles, tested through their boxes: intersects is
true. A boolean has nothing to draw, so the picture shows the inputs.
Related nodes
- Contains Point: tests a point.
- Union: the box around both.