[ODE] XML ODE Data Interchange Format (revised)

Roel van Dijk roelvandijk at home.nl
Tue Mar 9 16:37:29 MST 2004


I really like the idea of an XML format for ODE. I'm looking forward to using 
it!

> I am also getting a list of "common" extensions which aim to solve the
> most common needs not catered for by the standard tag set.  These are
> listed here (but are NOT part of the spec!):
> http://tankammo.com/xode/xode-extensions.txt

How about an extension for breakable joints:

<!-- inside the properties tag of a joint tag -->
<ext>
	<extension name="breakable-joint">
		<!-- Break condition for the first body connected to the joint. -->
		<breakcondition body="1">
			<!-- Breaks at a certain force, NOT at a certain torque. -->
			<force x="1.5" y="1.5" z="1.5"/>
		</breakcondition>

		<!-- Break condition for the second body connected to the joint. -->
		<breakcondition body="2">
			<!-- Breaks at a certain torque, NOT at a certain force. -->
			<torque x="1.0" y="1.0" z="1.0"/>
		</breakcondition>

		<!-- Not sure about this, but a breakable joint can have a callback
		      function that is called when the joint breaks. -->
		<callback name="bla"/>
	</extension>
</ext>

Having this extension inside the properties of a joint makes it a breakable 
joint. Having a break condition for a body implies that the joint can break 
where it is attached to that body. A force tag implies that the joint can 
break at a certain force but only if there is a force tag. If the force tag 
is omitted then the joint won't break under any force.
I'm not yet sure how to store the callback function. I think it really depends 
on the application to do something with the name (or id) of the callback; ie. 
convert it to a pointer to a function.


More information about the ODE mailing list