I have a 2D space with objects, each object has coordinate vector and an array of vertexes relative to his coordinate, now I need an efficiency way of storing the objects, this store should be able to add and remove objects, also the most important part is the collision detection:
I want to get a list of objects which have a chance to collide (close neighbor etc.), should be fast and simple in about
O([number of objects with collision chance] * log([number of all objects])) so that way when there is no close objects it should do it in O(1) and not the brute force way of just going over all of the objects in O(n).
Ask if something not clear.
Maybe you know some link on the subject or any good ideas.
Thanks.