vcglib/wrap/io_trimesh/export_dae.h

60 lines
1.3 KiB
C
Raw Normal View History

#ifndef EXPORTER_DAE_H
#define EXPORTER_DAE_H
#include <wrap/dae/xmldocumentmanaging.h>
#include <wrap/dae/colladaformat.h>
#include <wrap/dae/util_dae.h>
namespace vcg
{
namespace tri
{
namespace io
{
template<typename MESHMODEL>
class ExporterDAE
2006-11-06 06:29:40 +01:00
{
public:
static int Save(const MESHMODEL& model,const char* filename,const int mask,const QDomDocument* doc = NULL)
2006-11-06 06:29:40 +01:00
{
XMLDocumentWriter stream(filename);
if (stream.isReliable())
2006-11-06 06:29:40 +01:00
{
XMLDocument* document = Collada::DocumentManager::createColladaDocument(model,mask);
stream.write(*document);
Collada::DocumentManager::destroyColladaDocument(document);
2008-02-05 18:46:05 +01:00
return UtilDAE::E_NOERROR;
2006-11-06 06:29:40 +01:00
}
else
2008-02-05 18:46:05 +01:00
return UtilDAE::E_CANTSAVE;
2006-11-06 06:29:40 +01:00
}
static int GetExportMaskCapability()
2006-11-06 06:29:40 +01:00
{
int capability = 0;
2006-11-06 06:29:40 +01:00
//camera
//capability |= MeshModel::IOM_CAMERA;
2006-11-05 11:45:41 +01:00
//vert
capability |= MeshModel::IOM_VERTNORMAL;
capability |= MeshModel::IOM_VERTTEXCOORD;
capability |= MeshModel::IOM_VERTCOLOR;
//capability |= MeshModel::
////face
////capability |= MeshModel::IOM_FACEFLAGS;
////capability |= MeshModel::IOM_FACECOLOR;
//capability |= MeshModel::IOM_FACENORMAL;
2006-11-06 09:45:13 +01:00
////wedg
capability |= MeshModel::IOM_WEDGTEXCOORD;
capability |= MeshModel::IOM_WEDGNORMAL;
2006-11-06 09:45:13 +01:00
return capability;
2006-11-06 09:45:13 +01:00
}
};
}
}
}
#endif