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

Opengl mouse picking - Pick Curves and lines using a selection cone #235

Merged
merged 4 commits into from
Aug 1, 2023

Conversation

kayomarz
Copy link
Collaborator

With this PR, we will be able to pick lines and curves which currently cannot be picked.

This PR implements a selection-cone (in the shape of a pyramid) in order to pick curves and lines.

The reason for using a selection cone instead of a ray is iiuc, that its more likely that a ray might not intersect a line owing to the finite resolution of the canvas from which we interpolate a point on the far plane to create a ray.

Suppose this resolution were high enough, intersecting a ray with a line would require more precision via the user interface. On the ohter hand with the selection cone, we can define the angle of the cone which decides how much leeway/freedom we can allow so that even a mouse click near a line results in it being picked.

@kayomarz kayomarz requested a review from kaveh808 July 31, 2023 15:59
@kayomarz kayomarz changed the title Opengl mouse picking lines selection cone Opengl mouse picking - Pick Curves and lines using a selection cone Jul 31, 2023
Copy link
Owner

@kaveh808 kaveh808 left a comment

Choose a reason for hiding this comment

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

Looks like a very useful addition. Thanks.

@kaveh808 kaveh808 merged commit ff26f6c into main Aug 1, 2023
@kayomarz kayomarz deleted the opengl-mouse-picking-lines-selection-cone branch August 1, 2023 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants