GPWiki.org
GPWiki.org
It is currently Wed Jun 19, 2013 4:59 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Aug 23, 2010 6:40 pm 
Hi,


I'm trying to find the best spatial data structure for storing objects in a very large dynamic world. Dynamic in the sense of objects can move into.

I read some stuff, there are many manners to do that, mostly tree like structures and spatial hashing.
There are many trees designed for static world, some others for dynamic world, and even initially for static worlds with a support for dynamic...

Generally, when a tree is "dynamic", world queries are interpreted in the time (with objects position extrapolated), i don't need this level of accuracy. I just need a structure to update objects and query for NN as fast as possible.

This structure is maintained server side and the number of objects and accesses may be very big. I don't want my threads blocked on a locked node for long time (time to remove/add in my current rtree...).

After read documents, i think the spatial hash is good. Am i wrong?

Can anyone put me on the right way?

Thanks,


Top
  
 
 Post subject:
PostPosted: Tue Aug 24, 2010 2:20 am 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Mon Sep 04, 2006 5:25 pm
Posts: 517
Location: U.S.
Sorry, but I'm having a hard time understanding what you're saying. What exactly do you mean by "Dynamic in the sense of objects can move into?"

_________________
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Programming tutorials and web-design services: http://www.wyrmmage.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 24, 2010 5:17 pm 
Sorry, my english is so bad ...

Quote:
Dynamic in the sense of objects can move into


It is because "dynamic" may be interpreted for lot of thing in a data structure..
Here i just want a structure with moving objects (AABB), without having to rebuild a big part of the structure for each object i want to move (like for a typical static tree).

Globally, for updating an object:
- in a spatial hash, i have to rehash the new AABB and update my indexes.
- in a quad tree, i have to remove the object, and reinsert it from the root node.

But some trees are supporting an improved "update" system.

So, i'm asking which way i should investigate, tree, spatial hash or may be another.
There is a lot of theory for this kind of problem and i just want to start on the right way).


I hope this is a better explanation ...

Thank you.


Top
  
 
 Post subject:
PostPosted: Wed Aug 25, 2010 1:16 pm 
Technomaniac

Joined: Sun Dec 05, 2004 11:27 am
Posts: 3249
Location: Sydney, Australia
A quad tree or an oct tree is a nice simple start. If you want to get fancier, you can look into R trees (or R-trees, or R+trees, or R*trees, which I think are all slightly different :)).

However, quad/oct-trees are probably good just because they are simple.

_________________
Trying is the first step towards failure
b


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group