Spatial Object Management

Started by
2 comments, last by JohnBolton 19 years ago
Does anyone have any good resources for spatial object management? There are plenty of good resources on BSP trees, etc, but these tend to be for visibility, and most of the algorithms are geared towards view arc. What I'm wanting is far more generic for use in AI, and other components. A Queryable spatial structure... Like: 1. Give me a list of objects within 100 meters of me. 2. Give me a list of objects that are within 100 meters of me, and there exists no more than 2 walls between us. 3. Give me all objects that stand between me and another object. 4. etc. NOTE: I'm talking about objects here, not geometry, every object is essentially a bounding box or bounding sphere. I've come up with a few algorithms, and they'd probably work but I'm curious to know if anyone has any cool solutions, or knows of some good resources. -Thanks
He''s a bad motha - Shut yo mouth.
Advertisement
You're essentially wanting to do

1. Point search within a radius
2. Point search within a radius + raytrace
3. Raytrace

Your best bet for doing these in one data structure is probably a KD-Tree.
KD Tree looks like it might be what I'm looking for. I'd heard of KD-trees before, but only in that a BSP is child of KD. And bsp trees didn't seem like the right fit for this kind of search.

Thanks,
Jeff
He''s a bad motha - Shut yo mouth.
Quote:Original post by shaft
... I'd heard of KD-trees before, but only in that a BSP is child of KD. ...


A KD tree is an axis-aligned BSP tree. The partitioning strategies are generally very different though.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement