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

Shaul Kedem shaul_kedem at yahoo.com
Fri Mar 19 00:27:06 MST 2004


Hi,
 About the general question - please remmember that
most DOMs will fill an attribute set (which usually
goes with some kind of a map, hash or else) when
encountered by an attribute, which means that the
number of attributes within a specific element is best
kept down (I can't tell you if the 11 axis' attribute
(according to Nate's proposal) will cause such a
drastic performance hit though.

 About the two questions-
> 1) keep the current format

I vote for the current format, having loads of
optional attributes is kind of a mess.
 
> 2) if an element has no attributes and a single
value in its innertext, make it an attribute of its
parent

yes, with the exception of elements like axis, which
have too many attributes too-be. (+this is not to be
confused with the previous discussion about why not to
use attributes as data flags)

Shaul

--- Nate W <coding at natew.com> wrote:
> On Fri, 19 Mar 2004, William Denniss wrote:
> 
> > 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... 
> 
> A "thing" that has attributes of its own should
> probably be an element.  
> For example I'd prefer the torque vector be
> expressed as <torque x="0"
> y="0" z="0"> rather than torquex, torquey, torquez
> approach.
> 
> > Wouldn't having everything as attributes make the
> file a bit of a mess?
> 
> I guess that's an aesthetic thing - I like
> attributes because they cut
> down on 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" />
> 
> And I agree, but only you've indented one and not
> the other. :-) I think a
> fairer comparison would be:
> 
> <axis 
> 	lowStop="0" 
> 	hiStop="0"
> 	vel="0" 
> 	fMax="0" 
> 	fudgeFactor="0" 
> 	bounce="0" 
> 	CFM="0" 
> 	StopERP="0"
> 	StopCFM="0" 
> 	SuspensionERP="0" 
> 	SuspensionCFM="0">
> 	<rotation x="1" y="1" z="1"/> 
> </axis>
> 
> ...which I think looks better than either of the
> above.
> 
> I agree about making the rotation vector a child
> element.  The x/y/z
> values form a vector and I think it makes sense to
> exress vectors as
> elements.  One could argue for <stop low="0"
> high="1"/> but I wouldn't go
> that far - there's no common data type with "low"
> and "high" members as
> there is with x, y, and z.
> 
> > Do we need to vote on this too?
> 
> I dunno... if we get into the details of exactly
> what should be an
> attribute and what shouldn't, it could drag on for a
> while.  Maybe a vote
> on the general approach, though, e.g.
> 
> 1) keep the current format
> 
> 2) if an element has no attributes and a single
> value in its innertext,
> make it an attribute of its parent
> 
> -- 
> 
> Nate Waddoups
> Redmond WA USA
> http://www.natew.com/
> 
> 
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode


__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com


More information about the ODE mailing list