Curtis Olson wrote:
> On Sat, Mar 21, 2009 at 12:06 PM, Tim Moore wrote:
> 
>     Melchior FRANZ wrote:
>
>     > Doesn't sound like a valid reason to me:
>     >
>     >   SGVec3 vec = n->getVec3Value("/some/vector");
>     >
>     The syntax is actually:
>     Vec3d vec = n->getValue<Vec3d>()
>     > vs.
>     >
>     >   SGVec3 vec = getVec3(n->getNode("/some/vector", true));
>     That is not correct, because there is no explicit ordering of
>     property node children.
>     You need different functions, or some helper argument, for every
>     property type that
>     is vector-like -- colors, positions, normals, rotations, etc.
> 
> 
> I may be misunderstanding your point, but there are multiple children of
> a property node, all with the same name, then there is an explicit
> ordering ... you can provide the ordering yourself, i.e <value n="2"> in
> the xml file, or "value[2]" when referencing the property name, or
> getChild("value", 2) when using the tree walking API.   And if you don't
> specify any ordering, the values are created in sequential order. If you
> have unique property names, then I don't see a need for ordering since
> you just reference the name of the thing you need.
That's the point: colors and positions use red-green-blue and x-y-z, so there
isn't an explicit ordering; therefore you can't write a general function that
takes such a compound property node and returns a Vec3d or Vec4d.
> 
>     But in any case, I'm not worried so much about concise syntax in
>     C++; I'm talking
>     about the syntax of the XML files that will use the new properties.
> 
> 
> Again, I think that the syntax in the xml file is the least concern.  Do
> your expected usage cases involve 100's or 1000's of these entities
> where a few bytes here or there could make a noticeable difference, or
> just a few here or there where we are talking about fractions of a
> percentage of the overall fiile size?
A complex effects file might have 100 parameters, though that's probably
a stretch. On the other hand, there's not a lot of structure other than
parameters, so we are talking about a good precentage of the file.

Tim

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to