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

Use GJK algorithm to select elements on drag #76

Open
sprocketc opened this issue Oct 31, 2024 · 0 comments
Open

Use GJK algorithm to select elements on drag #76

sprocketc opened this issue Oct 31, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sprocketc
Copy link
Member

sprocketc commented Oct 31, 2024

We can use Gilbert-Johnson-Keerthi distance algorithm to determine if a shape is within the bounds of our select rectangle. We currently check against the bounds of the element, which is probably not accurate enough. We can still use that as a fallback method, or to filter out elements before running the accurate collision check. GJK algorithm is a fast way to test when convex shapes collide. You can check a really nice interactive explanation of the algorithm here.

@sprocketc sprocketc added the enhancement New feature or request label Oct 31, 2024
@sprocketc sprocketc self-assigned this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant