Sukender wrote:
Hi Paul and all,
I agree with you simplification, but I'm not sure it'll keep write(read(A))==A.
For instance:
- Read a model with a rotation (Y to Z-up for instance). Your +y facing plane
will be then +z facing.
- Write the model. Model is still rotated and will be +z in the file, thus
having write(read(A))!=A.
Transforms during write are already entirely under application control
because the application has access to the scene graph. In the case
above, if the app wants to restore the original coordinate system, it
would do this with the inverse transform before it writes the scene graph.
In fact, I don't think we need these options in the plugin for read,
either. The application would simply transform the scene graph after the
read completes.
In my opinion, the only situation in which plugins _require_ these
options is for the few formats that store units, handedness, and
coordinate system info in the file format, and the app needs to
"convertTo" a la OpenFlight. For all other formats, the application can
do the transformation itself, with a NodeVisitor or Transform.
But we should probably support some kind of transform Options for all
import plugins anyway, for backwards compatibility. If we change all
import plugins to not transform by default, application developers will
want an easy switch to get the old default behavior from the plugin.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org