[osg-submissions] Collada plugin enhancements

Mattias Linde linde at acc.umu.se
Wed Sep 26 01:40:58 PDT 2007


Hi,

I've attached some suggested changes to the collada plugin:

I've added a ColladaOptions class which can specify which DAE instance should
be used. If no options are used when osgDB::readNodeFile is called the plugin 
will work just as before.
(include/osgDB/ColladaOptions and src/osgDB/ColladaOptions.cpp in the tarball)

With the colladaoptions one can use an "external" (as in outside of osg) 
dae-instance which possibly already holds parsed data or an internal instance 
(the plugin creates one unless it has already done so). The options object
also makes it possible to get a pointer to the dae instance so it can be
used outside of osg.

src/osgPlugins/dae/ReaderWriterDAE.cpp have been updated to use ColladaOptions.
daeReader.h and daeWriter.h have one minor change each, a ; was removed after the
namespace end } which caused a warning.

CMakeLists.txt have also been updated to link with collada_dom_shared and 
collada_dae_shared (if not under win32) instead of collada_dom and collada_dae. 
This is because of collada-dom now supports building shared libs under linux 
(been tested on OS X aswell). Linking with the static libs in the plugin 
can (and have) cause problems if the application using osg links with collada-dom 
libraries.

/ Mattias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collada-updates.tar
Type: application/x-tar
Size: 30720 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070926/1d4724f3/attachment-0001.tar 


More information about the osg-submissions mailing list