[ODE] XODE - should angles be in degrees or radians?
William Denniss
lists at omegadelta.net
Fri Mar 19 15:16:55 MST 2004
We could go with the objects=elements and properties=attributes model
but then we would have to make it consistant thoughtout. Should the
other element of joint 'link2' be an attribute as well? What about
mass, and torque, and force of Body? The latter two have multiple
attributes themselves so it would have to be "torquex" "torquey" etc...
Wouldn't having everything as attributes make the file a bit of a mess?
Personally I think this:
<axis>
<rotation x="0" y="-1" z="0" />
<lowStop>0</lowStop>
<hiStop>0</hiStop>
<vel>0</vel>
<fMax>0</fMax>
<fudgeFactor>1</fudgeFactor>
<bounce>0</bounce>
<CFM>0</CFM>
<StopERP>0.05</StopERP>
<StopCFM>0.0001</StopCFM>
<SuspensionERP>0.05</SuspensionERP>
<SuspensionCFM>0.0001</SuspensionCFM>
</axis>
Looks better than this:
<axis rotationx="1" rotationy="1" rotationz="1" lowStop="0" hiStop="0"
vel="0" fMax="0" fudgeFactor="0" bounce="0" CFM="0" StopERP="0"
StopCFM="0" SuspensionERP="0" SuspensionCFM="0" />
I have used attributes in many places - but I just figured that they
arn't suited for everything. Visualisation wise, personally, if I see
an element with only a value and no child elements, I assume it is a
property of the parent element anyway.
Do we need to vote on this too?
Cheers,
Will.
On Fri, 2004-03-19 at 14:40, Nate W wrote:
> 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.
--
William Denniss - will@ http://tanksoftware.com/
More information about the ODE
mailing list