From Roger James, "The changes are as follows:-
1. DAE object no longer held onto by plugin. 2. Filename to URI conversion now handled internally by plugin. 2. User can supply an external DAE object for use by the plugin. 3. User can supply a std:string object for the plugin to return the URI of the document just processed. 4. User can supply a std::string to receive the unit name information from the document just read in. (e.g. meters, inches, etc.) 5. User can supply a float to receive the metric conversion factor from the document just read in. 6. User can supply an enum to receive the up axis orientation information from the document just read in. 7. Material transparency can be both read and written. 8. User can supply an experimental GoogleMode option on output. The plugin will try to emulate the way Sketchup specifies transparency (i.e. the inverse of what it should be!). I am still struggling to get GE to understand transparency, anyone know what it expects? 9. Rudimentary support for Collada effect parameters (newparam, setparam, param) on input. Basic nVidia FX Composer dae documents can now be read. "
This commit is contained in:
@@ -22,16 +22,17 @@
|
||||
|
||||
using namespace osgdae;
|
||||
|
||||
daeWriter::daeWriter( DAE *dae_, const std::string &fname,bool _usePolygons ) : osg::NodeVisitor( TRAVERSE_ALL_CHILDREN ),
|
||||
daeWriter::daeWriter( DAE *dae_, const std::string &fileURI, bool _usePolygons, bool GoogleMode ) : osg::NodeVisitor( TRAVERSE_ALL_CHILDREN ),
|
||||
dae(dae_),
|
||||
usePolygons (_usePolygons)
|
||||
usePolygons (_usePolygons),
|
||||
m_GoogleMode(GoogleMode)
|
||||
{
|
||||
success = true;
|
||||
|
||||
dae->setDatabase( NULL );
|
||||
dae->setIOPlugin( NULL );
|
||||
//create document
|
||||
dae->getDatabase()->createDocument( fname.c_str(), &doc );
|
||||
dae->getDatabase()->createDocument( fileURI.c_str(), &doc );
|
||||
dom = (domCOLLADA*)doc->getDomRoot();
|
||||
//create scene and instance visual scene
|
||||
domCOLLADA::domScene *scene = daeSafeCast< domCOLLADA::domScene >( dom->createAndPlace( COLLADA_ELEMENT_SCENE ) );
|
||||
|
||||
Reference in New Issue
Block a user