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

SelectionBox: fix corner cases #19414

Merged
merged 2 commits into from May 22, 2020
Merged

SelectionBox: fix corner cases #19414

merged 2 commits into from May 22, 2020

Conversation

pwmarcz
Copy link
Contributor

@pwmarcz pwmarcz commented May 21, 2020

I found these trying to implement selection for my own project:

  • my selection box allows the user to select all items that overlap it, so the degenerate case of a long line should still work,
  • my camera is inside a group that is translated from origin, and that broke selection for perspective camera.

Otherwise, the selection stops working when the camera is translated
by parent group.
The fix is relevant for both orthographic and perspective camera.

Also, a case where only one coordinate is identical (i.e. the
selection is a line) also causes invalid frustum. This is less
important if you're testing for a single point, because it won't
be inside anyway, but it breaks as soon as you test for
intersection of the box with a bigger object (bounding sphere
or bounding box).
pwmarcz added a commit to pwmarcz/autotable that referenced this pull request May 21, 2020
@mrdoob mrdoob added this to the r117 milestone May 22, 2020
@mrdoob mrdoob merged commit adc7b0a into mrdoob:dev May 22, 2020
@mrdoob
Copy link
Owner

mrdoob commented May 22, 2020

Thanks!

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.

None yet

3 participants