[ODE] XODE - should angles be in degrees or radians?

Nate W coding at natew.com
Thu Mar 18 20:40:51 MST 2004


On Fri, 19 Mar 2004, William Denniss wrote:

> new version up: http://tankammo.com/xode/xode.txt  radians only.
> 
> Does anyone have any other issues with the spec as it stands now?

In the spec now:

	<box>
		<sizex>2</sizex>
		<sizey>2</sizey>
		<sizez>2</sizez>
	</box>

	<cylinder>
		<radius>2</radius>
		<length>6</length>
	</cylinder>

My preference would be:

	<box sizex="2" sizey="2" sizez="2">
	<cylinder radius="2" length="6">

I'd also suggest making all of the elements under <axis> be attributes
instead:

	<axis x="0" y="0" z="1" lowStop="0" hiStop="3.14" ...>

Juice's XML has damn near everything as an element, but that was basically
because of laziness on my part.  If I were starting over I'd make far more
use of attributes.

Basically, I think that named scalar values should generally be
attributes.  It makes the XML a little more compact and (IMO) a little
more human-readable.  I just wrote some XML serialization infrastructure
in C# in which all elements are classes and all attributes are primitive
data types (properties of said classes), and that seems to work really
well.  Juice 2, if I ever get around to it, will work this way.

-- 

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




More information about the ODE mailing list