ExamplesByMesh icon indicating copy to clipboard operation
ExamplesByMesh copied to clipboard

Bounds-based QuadTrees appear to be broken?

Open olsonjeffery opened this issue 13 years ago • 2 comments

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

olsonjeffery avatar Jul 14 '11 08:07 olsonjeffery

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.

Glidias avatar Dec 22 '11 18:12 Glidias

I confirm that duplicates items are retrieved using bounds. Evidence in the image attached.

16ItemsInsteadOf13

canonex avatar Mar 27 '13 17:03 canonex