GKRTRee should provide functionality returning elements which overlap a search rect.

Originator:patrick
Number:rdar://33177729 Date Originated:07-Juli-2017 11:41 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.0b2
Classification:Feature (New) Reproducible:Not Applicable
 
Summary:
This is a duplicate of radar #33176154

As discussed in radar #32786254 GKRTree’s elements(inBoundingRectMin:rectMax:) only returns elements which are fully contained by the specified boundingRectMin/Max (although the documentation is contradicting on this). 
For various R-Tree use cases (like collision detection, lasso selection, nearest neighbour search) it would make sense to have a method elements(overlappingBoundingRectMin:rectMax:) which returns all elements which are fully contained by the boundingRect + all elements which are intersecting the boundingRect.


Steps to Reproduce:
-

Expected Results:
The query in the attached playground should work with elements(overlappingBoundingRectMin:rectMax:)

Actual Results:
-

Version:
11.0b2

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!