In a space partitioning structure, for either collision checking or graphic optimization (or both), you have two kinds of objects, mobile and static.
The proportions of the population will change depending on the game itself, some will have just a few mobile and tons of statics and some may have truckloads of mobiles and just a few statics.
How you update your space partitioning structurte will likely be driven by these characteristics, in games with mostly static content the best approach is to keep the structure stored for the statics and have the mobiles update their position in the structure, if your object knows which node of the structure it is stored in, you could trigger the reevaluation of the object from that node, make a check for containment, if its contained check child nodes, if its intersected by the node boundaries or has no overlapping at al move it up the hierarchy and re check.
If you have more mobile entities than static, a full recalculation may be the best approach, though in these cases, like bullet hell games, entirely different techniques than space partitioning are usually more effective.
If its an entirely learning experience, try to abstract yourself of the quadtree, the octree, the bsp or any specific structure and try to think of a system that would allow you to use any of these and even combine them, what is a space partitioning structure? what do they all have in common? its a node structure with space containing boundaries and a hierarchy where all nodes are fully contained by their parent.
Think of special cases that would still qualify, for instance, this one is assumed invalid by many people not familiar with these structures, the only rule is that the child node is fully contained by the parent, it doesn't say nor there is any reason why it wouldn't be valid, that the child nodes must not overlap each other, which could solve the horribly annoying defect that if an object is on the exact center of a quadtree, it can only be stored on the root node regardless of how small the object may be.
You could for instance, have a quadtree that stores an exterior, open world, in which there is somewhere a large building, the building will have its own space partitioning structure for the objects inside it, this structure can be a sub node of the quadtree node in which the building is located. The inside of the building may best be represented by a graph of rooms and the conent of those rooms may best be repesented by a BSP, which would be a sub node of the graph node for that room.
If you design your classes and system well, this should be entirely possible and efficient.
Edited by NEXUSKill, 21 May 2013 - 08:37 AM.