KDTree : Add enclosedPoints() method that takes a list of half-spaces - #1565
Open
danieldresser-ie wants to merge 4 commits into
Open
danieldresser-ie wants to merge 4 commits into
danieldresser-ie wants to merge 4 commits into
Conversation
signatures taking OutputIterators are now deprecated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds the machinery needed in KDTree to do a frustum query, as needed by the paint tool. Converting a camera frustum to a set of half-spaces is not currently included here, since it doesn't require access to the KDTree internals ... maybe you want that in Cortex somewhere? Currently it's just an anonymous function in the paint tool.
The hardest part of this is probably naming the new method. "Intersection of a set of half-spaces" is not really a standard name for a geometric primitive, but it is the clearest way I can think of describing it ... especially if it needs to work in both 2D and 3D. If we could use Imath Planes to store the pair of origin and normal, I would use that, but that isn't defined for the 2D case.
Other slightly awkward things:
IsIterator<T>and!IsIterator<T>... still not sure what was going on there, but it seems to work OK for any valid calls, so hopefully this will keep any existing usage of enclosedPoints working.