Skip to content
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

Line.raycast() to raycast() relocation #126

Merged
merged 43 commits into from
Oct 31, 2022
Merged

Line.raycast() to raycast() relocation #126

merged 43 commits into from
Oct 31, 2022

Conversation

novialriptide
Copy link
Member

@novialriptide novialriptide commented Oct 6, 2022

There will be another follow-up PR that will fix #127 after this has been merged.

Fixes: #58

This PR adds a new feature that supports angles for raycasting as well.

@novialriptide novialriptide added submodule:geometry type:cleanup Includes moving code, refactoring or reformat type:partial_rewrite Partially rewrites an existing feature lang:c priority:RELEASEBLOCKER labels Oct 6, 2022
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
geometry.pyi Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
@itzpr3d4t0r itzpr3d4t0r added needs-tests Requires writing unit tests dont-merge labels Oct 7, 2022
src_c/geometry.c Outdated Show resolved Hide resolved
@Emc2356 Emc2356 removed dont-merge needs-tests Requires writing unit tests labels Oct 29, 2022
Copy link
Member

@itzpr3d4t0r itzpr3d4t0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the first part of the review because i gtg, be ready for a second one after you made the changes.

src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/collisions.c Outdated Show resolved Hide resolved
src_c/collisions.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
test/test_line.py Outdated Show resolved Hide resolved
@itzpr3d4t0r
Copy link
Member

itzpr3d4t0r commented Oct 30, 2022

I think we should also abstract away the whole "get something that looks like a ray out of the params list" into a separate function Like pgRay_FromFastcallArgs(args**, nargs-1, line*) and pgRay_FromObject(PyObject*, line*). This would help drammatically reduce the future multiraycast() implementation complexity.

examples/raycast.py Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
src_c/geometry.c Outdated Show resolved Hide resolved
@itzpr3d4t0r itzpr3d4t0r merged commit 762adc4 into main Oct 31, 2022
@novialriptide novialriptide deleted the raycast branch November 1, 2022 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-merge lang:c priority:RELEASEBLOCKER submodule:geometry type:cleanup Includes moving code, refactoring or reformat type:partial_rewrite Partially rewrites an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line.raycast() / raycast() internal rewrite Move Line.raycast() to raycast()
3 participants