[ODE] ODE GUI Editor #2...

Steve Baker sjbaker1 at airmail.net
Fri Feb 27 11:32:57 MST 2004


Nate W wrote:

> There are two distinct goals being discussed here:
> 
> 1) An easily understood (but not necessarily fast) format for interchange
> between different ODE editors and runtimes;
> 
> 2) A fast and trivial-to-use format for use when speed is important and
> interoperability is irrelevant.

I don't see how a binary format is easier to use.  If a loader is provided
with ODE - then whether the file is binary or ASCII, the API to load it
should be the same.

>>That's something I found a challenge in when loading/saving, i.e. to
>>find the right body the joint is supposed to be connected to when
>>loading it back in. Also, if we want to connect meshes and other
>>things, we need to know which object it's connected to.
> 
> 
> With Juice, and with another non-ODE-related project I'm working on, I
> save each object with the ID it has at save-time, and the IDs of the
> 'connected' objects.  At load time, I build a hash table that maps the old
> IDs to the new IDs, and I use that to re-connect everything.  I've used
> this method in a few projects actually, it works just fine.

I always map the ID's into nice consecutive numbers when WRITING the
file - then in the loader, you can do a fast array lookup to get to
the address or other identifier of an entity.

IMHO, it's always a good idea to do as much of the work as possible in the
file writer because we always pretty much always read a file more often
than we write it out - so it's worth putting the effort into the writer to
make the loader run more quickly.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net>    WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
            http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----



More information about the ODE mailing list