ExamplesByMesh
ExamplesByMesh copied to clipboard
Bounds-based QuadTrees appear to be broken?
Here's a jsfiddle test case for a QuadTree that is supposed to include bounds.. http://jsfiddle.net/zYMpN/2/
Notice the weird behavior (duplicates.. not really meeting described behavior) in the results.. not even sure where to being with this.
This point quad testcase, OTOH, seems to work fine: http://jsfiddle.net/zYMpN/6/
Any thoughts/feedback would be appreciated.
Thanks
Well, from the source code browsing, I knew something was fishy since the only referenees to "item.width/item.height" occurs during insertion methods, but not under retrieve methods. Retrieve methods should also take into consideration item.width/item.height, but i dont see any of those.
I confirm that duplicates items are retrieved using bounds. Evidence in the image attached.