Opengl mouse picking - Pick Curves and lines using a selection cone #235
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.
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.