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. "
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
#ifndef _READERWRITERDAE_H_
|
|
#define _READERWRITERDAE_H_
|
|
|
|
|
|
#include <OpenThreads/ReentrantMutex>
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// OSG reader/writer plugin for the COLLADA 1.4.x ".dae" format.
|
|
// See http://collada.org/ and http://khronos.org/collada/
|
|
|
|
#define EXTENSION_NAME "dae"
|
|
|
|
class ReaderWriterDAE : public osgDB::ReaderWriter
|
|
{
|
|
public:
|
|
ReaderWriterDAE()
|
|
{
|
|
}
|
|
|
|
const char* className() const { return "COLLADA 1.4.x DAE reader/writer"; }
|
|
|
|
bool acceptsExtension(const std::string& extension) const
|
|
{
|
|
return osgDB::equalCaseInsensitive( extension, EXTENSION_NAME );
|
|
}
|
|
|
|
ReadResult readNode(const std::string&, const Options*) const;
|
|
|
|
WriteResult writeNode(const osg::Node&, const std::string&, const Options*) const;
|
|
|
|
static std::string ConvertFilePathToColladaCompatibleURI(const std::string& FilePath);
|
|
|
|
private:
|
|
mutable OpenThreads::ReentrantMutex _serializerMutex;
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
#endif
|
|
|