As I understand it there are 3 popular strategies for spatial partitioning: sweep and prune, quad/oct tree and uniform grid. Uniform grid is problematic for me because I have not set an upper limit on how big each entity can become so every time an entity move I may need to update multiple grids.
So right now I am exploring sweep and prune vs trees on which is better for my use case. I know for sure that a majority of my objects contained in the structure will be moving every frame. I need to support 2 tests: 1) whether any objects overlap/collide with each other and 2) whether any object will overlap/collide with a ray that can traverse through the entire playing region.
I know for question like these the answer is usually impossible to know beforehand without testing etc. But certainly this is a very common problem and many of you have experience with. If so, can you share the strength/weakness of each method with respect to my use case and which method is more likely to produce better results? And for the record I am trying to animate 1k+ dynamic entities in 3D space so brute forcing is unlikely to be enough. I also have another structure for static objects so all contained entities are dynamic.