Skip to content

Add intersection functions to Polygon, Line, Circleย #169

Open
@itzpr3d4t0r

Description

@itzpr3d4t0r

All shapes have bool collision functions that return True if they overlap with another shape, both of matching, unmatching and general (collideswith) type.
We should implement similar intersection methods, but these will return:

  • An empty list if 0 (or infinite) intersections were found
  • A list of intersection points if 1 or more intersections were found

The methods would be the following:

  • Circle intersect()
  • Line intersect()
  • Polygon intersect()

I'm able to start this series of PRs by adding the base intersection functions ( that will be different to the ones we have now) as well as some of these complete implementations right away, just to kickstart it all.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions