Hi Farshid,

The exporter applies the material statesets to the osg::Drawable object,
which does not support description strings. I can add the description to
the parent osg::Geode. However, keep in mind that the geode can contain
multiple drawables, where each drawable has a unique material applied.
So you could still have multiple descriptions applied to the geode. So
would you prefer adding the descriptions to the geode or root node?

I think Geode is closer to the real intent than the root... Does the exporter give unique names to the Drawables? If so, then the description strings added to the Geode could say that Drawable named "A" has this material, Drawable named "B" has this material, and so on.

This same scheme could be used at the root of the model, sure, but that would be much messier as lots of information would be at the same place. In the Geodes, at least it's just a small set of information (for the Geode's Drawables) that needs to be there.

I agree it's not ideal... But until the metadata system on osg::Object lands (and for formats that won't support metadata), it's better than putting it on the root of the model IMHO.

Actually, I've decided on using the tab character. This should avoid
conflicts with filenames and seems more readable to me.

Hmm, are you adamant on that? I personally don't like tabs, to the point that I configure all my editors to insert spaces instead of tabs when I press the Tab key... Plus, it can happen that the length of a token is 1 less than the tab length, and then your tab looks like a space visually, so you have to check it's really a tab... Tabs are unambiguous for the machine but seem ambiguous for humans to me.

If you really want tab it's ok, as the strings will most of the time not be edited by hand, but space is just as readable and less ambiguous (visually) I think, apart for the filename issue. I tend to prefer things that are unambiguous to humans, even if it means more trouble to parse.

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                    http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to