-
Notifications
You must be signed in to change notification settings - Fork 10
Circle collidepolygon()
and Polygon collidecircle()
#189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
corrections to .pyi
corrections to .pyi(s)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
submodule:circle
submodule:collisions
submodule:polygon
type:new_api
Adds new functionalities to the project
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should close #180 and #175.
Added:
collidepolygon()
function, with optionalonly_edges
param (only does edge collision) defaulting toFalse
collidecircle()
function, with optionalonly_edges
param (only does edge collision) defaulting toFalse
pgCollision_CirclePolygon
and_pgCollision_PolygonPoint_opt
helper (faster version ofpgCollision_PolygonPoint
that assumes the point passed not to be one of the polygon's vertices)Changed:
Coordinate
fromUnion[Tuple[float, float], Sequence[float], Vector2, Tuple[int, int]]
toUnion[Sequence[float, float], Vector2, Sequence[int, int]]
Removed
pgCollision_LineLine
,pgIntersection_LineLine
,pgCollision_LineCircle
,pgCollision_CircleCircle
,pgCollision_RectLine
,pgCollision_RectCircle
This PR is also a nice example of how to use the newly added Polygon internal functionality for working with polygons outside the polygon module.

A screenshot from the example: