To simplify things, I'd propose the following:
- I don't think we need options to control writing. Your app can do
any required transformation with a NodeVisitor before calling osgDB to
write. The plugin should just write the scene graph passed to it.
- For reading, we just need rotation and scale options. "rotate <axis>
<degrees>" and "scale <x> <y> <z>". Those alone will handle changes to
orientation, handedness, and unit scaling.
- If the format stores an up vector, handedness, and unit information,
then the import plugins for those few formats need some kind of
"convertTo" option, sort of like FLT's "convertToMeters" (which scales
the model from its native units).
As an addendum to the last point, regarding Ulrich's comment, an import
plugin can only convert to right-handed if it knows the handedness of
the model. Which formats store that information? And to clarify,
OpenGL's "right-handed" rule is only the default for the definition of a
front face. Your application and your models may or may not use this
convention, and I think it would be wrong for a plugin to do such a
conversion automatically, assuming it knows something about the
convention you are using.
Finally, in principle, I agree: write( read( A ) ) should equal A. But I
want to re-emphasize this can only be true in the context of coordinate
systems. (100% equality in round-trip model conversions is essentially
an impossibility.)
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org