Hello Boto,

if i got you right, you suggest to implement a kind of proxy plugin associated 
with a particular file extension which would make use of existing plugins in 
order to load different file formats.

Right, I only suggest it because:

* It requires minimal (or no) changes to the existing osgDB API.
* It already works for some pseudoloaders which come with OSG standard.

For example, try this command line:

osgviewer cow.osg cow.osg.(10,0,0).trans cow.osg.(20,0,0).trans.(90,0,0).rot cow.osg.(0.5,0,0).scale

You will get a first cow at (0,0,0), with a smaller cow inside it, and two other cows beside it, one of which will be on its side (if I'm visualizing this right, I can't test it where I am at the moment).

See what that's doing? osgDB sees the .trans/.rot/.scale extensions, passes the filenames to the right plugin, which then, instead of loading a file directly, parses the part before the extension, builds a MatrixTransform with that information, and then calls osgDB::readNodeFile with the part before that as filename (cow.osg or anything else). This can then be chained and work transparently.

It's a very powerful concept, totally transparent, and easy to use. I don't quite get why you think it's not general enough, but then again, I'm not the one who will implement this, so you can do it however you want to.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to