> From: Melchior FRANZ
>
> * Josh Babcock -- Thursday 09 June 2005 05:39:
> > It looks like rotate animations require an <x-m> coord for <center> tags
> > even though you can get away without <y-m> or <z-m>. What's worse, it
> > not only fails silently, it grabs the <y-m> value for <x-m> and then
> > uses the <z-m> value for <y-m>. Here comes the code.
>
> That's apparently by design.
>
> The attached path should make it more consistent: if there's at least one
> of axis/{x,y,z}, then use the axis notation. And there's at least one of
> center/{x,y,z}-m then use the defined center. (Only tested with *important*
> aircraft ... and the bo105 worked well with it.
>
> m.
Hi Melchior,
That is different, but not really better than what is in CVS now.
For points in space it doesn't make any more sense to default them to zero than
anything else. I'm not familiar with how fully configured XML systems should
work and what DTD (doc type definitions) can provide, but it'd be awful nice to
be able to throw an error when something is not correct or reasonable in the
XML. It doesn't seem reasonable to specify more than zero but less than 3
coordinates for either the center tag or the axis end point tags, because these
points in space. Even if a value IS zero, it is unecessarily ambiguous.
Only with the original rotation syntax (e.g. <axis><x-m>1.0</x-m></axis>) does
it make sense to default unspecified values to zero. This is why I say this
patch isn't any less broken than the current cvs.
In retrospect, it was probably a bad idea for me to use the existing axis tag
as was when adding the ability to specify axes by their endpoints (which BTW is
much easier than using the old rotation syntax). Or...alternatively, maybe the
structure of the original syntax should be something like this:
<axis>
<x-m></x-m>
<y-m></y-m>
<z-m></z-m>
<center></center>
</axis>
Because as the <x1-m>... <x2-m>... coordinates are properties describing the
axis, <center> is also by rights a property that describes the axis and not
the animation (as is implied by current syntax that specifies the <center> at
the same level as the <axis>).
I'm not sure right off how best to do this, but I do think that Flightgear and
Simgear would benifit by having a smart parser that could follow rules and give
intelligent error messages back to developers. Does anyone know if an XML
parser that used DTD specifications could work for this?
Best,
Jim Wilson
_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d