QuadTree in C++ for detecting 2D collision.