I'm having trouble understanding how inserting into a Barnes-Hut quadtree works. If the root represents the center of mass and all of nodes within the quadtree, what happens if you insert something that dramatically moves the center of mass?
For example if you have a quadtree with nodes in the top-right (northeast) and bottom-right (southeast), then insert a super massive object way way down bottom-left (southwest) that shifts the center of mass dramatically in that direction, the aforementioned bottom-left nodes are now in the wrong quadrant. What happens next, will I have to reinsert the nodes that are in the incorrect quadrant or am I missing some logic?