Original Post
Hi to all, right now am working on collision detection for my project and actually trying to implement sweep&prune for first stage collision filter. In teory its sounds realy easy but in practice its a bit harder that i expected. Problem is how to actually find which objects intersect?
I have two methods in my mind:
1) Classical approach i think is to sort list of mins and maxs (for each axis) with bubble sort and if two nodes swap we look for intersection and flag it somewhere if its happen. This approach needs some storage where to put theese flags. So, i think its not the better way, because of that storage.
2)Second is to take an object and project it to each axis[list of mins and maxs] and look if its intersect with something. In that case i do not need any storage for marking intersection, but before i project my object i need to update and sort theese three lists so process can look like that:
1.Update mins and maxs (aabb from object rotation)
2.Sort my axis lists of mins and maxs
3.Go trought all objects and project them to that axis, what means O(n), i think!?
Well, in my option the second one sounds beter but am thinking about how to merge update and sort so i can only project object on that axis, it can be optimized somehow?
So if i totally wrong about all that corect me please.
And is there any other dimension reduction algos that can be used for first pass collision filter, except sphere-trees?