std::function ad visitor for quad tree