Debian Codegraph @

vcg/wrap/io_trimesh/export_dae.h

raw symbols SCIP
1 #ifndef EXPORTER_DAE_H
2 #define EXPORTER_DAE_H
3
4 #include <wrap/dae/xmldocumentmanaging.h>
5 #include <wrap/dae/colladaformat.h>
6 #include <wrap/dae/util_dae.h>
7
8 namespace vcg
9 {
10 namespace tri
11 {
12 namespace io
13 {
14 template<typename MESHMODEL>
15 class ExporterDAE
16 {
17 public:
18 static int Save(const MESHMODEL& model,const char* filename,const int mask,const QDomDocument* doc = NULL)
19 {
20 XMLDocumentWriter stream(filename);
21 if (stream.isReliable())
22 {
23 XMLDocument* document = Collada::DocumentManager::createColladaDocument(model,mask);
24 stream.write(*document);
25 Collada::DocumentManager::destroyColladaDocument(document);
26 return UtilDAE::E_NOERROR;
27 }
28 else
29 return UtilDAE::E_CANTSAVE;
30 }
31
32 static int GetExportMaskCapability()
33 {
34 int capability = 0;
35
36 //camera
37 //capability |= MeshModel::IOM_CAMERA;
38
39 //vert
40 capability |= MeshModel::IOM_VERTNORMAL;
41 capability |= MeshModel::IOM_VERTTEXCOORD;
42 capability |= MeshModel::IOM_VERTCOLOR;
43 //capability |= MeshModel::
44 ////face
45 ////capability |= MeshModel::IOM_FACEFLAGS;
46 ////capability |= MeshModel::IOM_FACECOLOR;
47 //capability |= MeshModel::IOM_FACENORMAL;
48
49 ////wedg
50 capability |= MeshModel::IOM_WEDGTEXCOORD;
51 capability |= MeshModel::IOM_WEDGNORMAL;
52
53 return capability;
54 }
55 };
56 }
57 }
58 }
59 #endif