[ODE] XML ODE Data Interchange Format

William Denniss lists at omegadelta.net
Sun Mar 7 21:53:47 MST 2004


On Sun, 2004-03-07 at 16:25, Limor Schweitzer wrote:
> Great work on the RFC!

Thanks.

> I would put colours as OPTIONAL cause otherwise, editors/apps that dont use 
> colors will HAVE to put the color tag, which will inflate the file with 
> useless <color R=255 G=255 B=255> tags...

I shall.


> PLEASE add a tag for transform matrix. (matrix can be represented preferably 
> by 4x4 numbers but can also be by dx,dy,dz, yaw,pitch,roll or quaternion or 
> whatever -- anything under a transform tag is in the combined coordinate 
> system represented by the multiplication of the transform matrices before 
> it; hence herarchy)
> 
> advantages:
> 
> 1) If one editor knows about a herarchy of proxies/meshes/joints but 
> flattens it out before exporting, that information is lost for ever. if an 
> app doesnt care about the heirarchy in a XODE file, it can just ignore it 
> and use the flatened coordinates (generated by the c++ wrapper after reading 
> the file).
> 
> 2) the coordinate-system herarchy information would be retained strictly in 
> the C++ wrapper without ODE actually knowing about this. it would be pretty 
> simple to extend the current C++ ODE wrapper to support herarchy. I think 
> someone has done this in the past, i remember seeing something of this sort 
> it in the contrib subdir, but cant find it as i'm writing this.

Good suggestions, I shall add a generic <transform> tag which can store
its data in various ways.  Perhaps an attribute can specify if the
transform is relative to its parent (ie. part of the hierarchy you
describe).  Also, if a transform tag is left out, it inherits the
transform of the object's parent.

Some examples:

Hierarchy using relative transforms:

<body>
	<transform>
		<translation x="1" y="3" z="1" />
		<rotation x="0" y="0" z="0" />
		<scale x="1" y="1" z="1" />
	<transform>

	<geom>
		<transform relative="true">
			<translation x="1" y="4" z="-1" />

			<!-- absolute coordinates would be (2,7,0) -->

			<rotation x="0" y="0" z="0" />
			<scale x="1" y="1" z="1" />			
		</transform>
		<properties>
			...
		</properties>
	</geom>

	<geom>
		<!-- no transform tag - so it inherits the location of the containing
body -->
		<properties>
			...
		</properties>
	</geom>

	<body>

		...
	</body>
</body>

To make groups more useful, they could have a translation too which is
soley used when building a hierarchy of ode objects.  Thus, the tags
that fall into this category (ie. ones that can have a translation)
would then be <world>, <group>, <geom> and <body>.

Do you have any thoughts on joints - are there any improvements that can
be made there?  Due to the fact that XML directed acyclic graph, and the
fact joints can link several bodies, it isn't quite so straight forward.

Cheers,

Will.

-- 
William Denniss - will@ http://tanksoftware.com/



More information about the ODE mailing list