intersect method
List<Vector2>
intersect(
- PathComponent pathA,
- PathComponent pathB, {
- Rect? overlappingRect,
override
Returns the intersection points of the edges of all the polygons of
pathA and pathB.
Implementation
@override
List<Vector2> intersect(
PathComponent pathA,
PathComponent pathB, {
Rect? overlappingRect,
}) {
final intersectionPoints = _edgeIntersections(
pathA.possibleIntersectionVertices(overlappingRect),
pathB.possibleIntersectionVertices(overlappingRect),
);
if (intersectionPoints.isEmpty) {
return _enclosedCenter(pathA, _vertexOf(pathA), pathB, _vertexOf(pathB));
}
return intersectionPoints;
}