intersections function
Implementation
Set<Vector2> intersections(ShapeComponent shapeA, ShapeComponent shapeB) {
final intersectionSystem = _intersectionSystems.firstWhere(
(system) => system.supportsShapes(shapeA, shapeB),
orElse: () {
throw 'Unsupported intersection detected between: '
'${shapeA.runtimeType} and ${shapeB.runtimeType}';
},
);
return intersectionSystem.unorderedIntersect(shapeA, shapeB);
}