[ODE] XML ODE Data Interchange Format

Nate W coding at natew.com
Sun Mar 7 10:17:13 MST 2004


On Sun, 7 Mar 2004, William Denniss wrote:

> 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.

How about explicitly indicating which object the transform is relative to?

I've added a couple of attributes in ALL CAPS for clarity:

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

> 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.

  <joint id="456">
	<bodies a="123" b="234">
	...
  </joint>
	
Rules for the "id" attribute values should be very simple: they must be
numeric, and they must be unique within the file.  They need not be
persisted across load/save operations - I suggest a "name" attribute for
values that need to be persistent, e.g.

  <body id="1" name="left shin"> ... </body>
  <body id="2" name="left foot"> ... </body>

  <joint id="3" name="left ankle">
    <bodies a="1" b="2">
    ....
  </joint>



-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com/





More information about the ODE mailing list