An example for quadtree implementation, including following functions:
- divide the quadtree nodes by a line segment. The nodes will subdivide until size is 1.
- find a node that contains the given point. floor inclusive, ceiling exclusive.
It is somewhat bulky(around 600 tokens), and might need flood filling or some other features to be practical.
[Please log in to post a comment]