[ODE] Interactions between a hash-type parent space and a simple
child space?
Megan Fox
shalinor at gmail.com
Mon Nov 1 09:33:20 MST 2004
What I mean is that... say you've got a reasonably large world.
Imagine one load zone's worth of terrain in Morrowind, that's about
the right size. The interior world is divided into multiple
non-overlapping sectors, so now let's say you create a separate
sub-space for each sector (which live under the main "terrain grid"
space). Now let's say you drop about 20 ragdolls into the scene,
which of course each have their own sub-space again - and they're
spread across the scene.
Now if the terrain grid is a hash space, and the ragdolls are in
simple spaces, and you call dSpaceCollide on the parent terrain grid
space... will the ragdolls take advantage of the hashing in the parent
space? Or is the fact that the parent space is a hash space entirely
irrelevant in this scene? Would the ragdoll collisions at least be
optimized if the interior sector spaces were hashes (leaving me to
decide which interior spaces to collide with for maximum efficiency,
but letting ODE handle collision pair optimization within those spaces
I pick)?
Let's extend it further... now we've got just a box living in one of
the interior sectors, which is just in the sector space, and it
collides with ragdolls. Now does even this box care about the fact
that the overall space is a hash space? Or does a geom only care
about the type of space that it is immediately contained by?
I'm just a little confused at how dSpaceCollide() interacts with
sub-spaces - if it does some creative internal logic to sort objects
contained in sub-spaces by whatever method it has, or if it just does
a dumb "Ok, I know I have a space, so we'll just do a worst-case
collide everything in that space" pass? Can I depend on the parent
hash space to sort things out, or do I need to be handling this sort
of collision optimization via my own custom logic (in cases where I
have multiple levels of sub-spaces)? And most especially, does having
a sub-space container (like for the ragdolls) tend to screw things up,
or not, and how many levels of subspaces can I have before it does -
just one, or more?
Thanks,
-Megan Fox
More information about the ODE
mailing list