[DGD]serialisation/deserialisation of mixed data.

Par Winzell zell at ncal.verio.com
Wed Apr 28 22:10:33 CEST 1999


Hi,

> What I'm trying to do is create a 3d space management system that
> insures that no two objects exist or overlap in space.  This 
> system would take into account that container objects like rooms
> and bag define their own space regions.

I have to agree with Ludger here that this doesn't become an LPC question
until you've settled on an algorithm you want to use. Make a list of the
kind of queries you need to be able to do -- for example, "would X overlap
Y in space", and "what are some neighbours of X" -- and then go look up a
computer graphics reference manual.

>From what I can recall out of hand, aren't octrees specifically designed
to handle this kind of problem? Their power may be somewhat wasted if all
your objects are rectangular, though.

If I understand the algorithm you propose correctly, location spanning
certainly does become an issue. If the datastructure itself doesn't
contain any information about span, but only the "lower" corner, and we
wish to test for overlap, it stands to reason that we must query for the
dimensions of everything "to the left" of the object being tested. That
could quickly bog down these tests, pretty much regardless of whether you
use mappings or arrays?

As you say yourself, the same problem applies to neighbour-finding. If
your data has no knowledge of size/span, you have to search all the data.
No good. I believe these are precisely the problems that octrees avoid.
On the other hand, it's been a decade since I read about this stuff.

Zell


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list