* Checks if object intersects with another object * @param {Object} other Object to test * @return {Boolean} true if object intersects with another object
(other: ObjectGeometry)
| 218 | * @return {Boolean} true if object intersects with another object |
| 219 | */ |
| 220 | intersectsWithObject(other: ObjectGeometry): boolean { |
| 221 | const intersection = Intersection.intersectPolygonPolygon( |
| 222 | this.getCoords(), |
| 223 | other.getCoords() |
| 224 | ); |
| 225 | |
| 226 | return ( |
| 227 | intersection.status === 'Intersection' || |
| 228 | intersection.status === 'Coincident' || |
| 229 | other.isContainedWithinObject(this) || |
| 230 | this.isContainedWithinObject(other) |
| 231 | ); |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Checks if object is fully contained within area of another object |
no test coverage detected