This project is read-only.

CSharpQuadTree Source

Rating:        Based on 2 ratings
Reviewed:  2 reviews
Downloads: 4515
Released: Jul 9, 2009
Updated: Jul 9, 2009 by ecassidy
Dev status: Beta Help Icon

Recommended Download

Source Code CSharpQuadTreeSource
source code, 19K, uploaded Jul 9, 2009 - 4515 downloads

Release Notes

Here is my QuadTree implementation in C#. After looking for a complete, working example, and finding none, I made my own. And now I'm sharing it with my fellow lazy developers!

Its a generic implementation, however objects added must implement the IQuadObject interface - its used to notify the QuadTree that the objects boundary has changed (yes, thats right, it will remap itself based on changes to the underlying boundaries).

It has an overloaded constructor, allowing you to specify whether or not you want query results returned sorted in the order in which they were added. The methods are locked, so it can handle multithreaded access (I have multiple threads hitting it in my app).

Anyway, I'm sure the code is self explanatory, good luck :)

Reviews for this release

     
Nicely done and very useful! Used this to speed up custom drawing onto a large, scrolling control and it did the job excellently.
by DrHerbie on Sep 23, 2013 at 3:13 PM
     
Really easy to use, no dependencies (just two files), based on built-in .Net classes (Rect) - a true time-saver.
by karolek13 on Mar 2, 2010 at 11:53 PM