I was thinking about using a TMap to store all objects in a scene.
Every entity has a center position and a radius. I want a fast method of retrieving all entities within a bounding box. How would I use this with TMap? Obviously I could sort entities by position, and use 1 TMap for each axis. What about the radius? I would want to get all entities whose maximum extents lie within a bounding box, so then I would need 6 TMaps; one for the minimum extents on each axis, one for the max extents on each axis. Would this be slow? Is there a better way?
Any comments on this?
Every entity has a center position and a radius. I want a fast method of retrieving all entities within a bounding box. How would I use this with TMap? Obviously I could sort entities by position, and use 1 TMap for each axis. What about the radius? I would want to get all entities whose maximum extents lie within a bounding box, so then I would need 6 TMaps; one for the minimum extents on each axis, one for the max extents on each axis. Would this be slow? Is there a better way?
Any comments on this?