export_dae.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 * VCGLib                                                            o o     *
00003 * Visual and Computer Graphics Library                            o     o   *
00004 *                                                                _   O  _   *
00005 * Copyright(C) 2004-2008                                           \/)\/    *
00006 * Visual Computing Lab                                            /\/|      *
00007 * ISTI - Italian National Research Council                           |      *
00008 *                                                                    \      *
00009 * All rights reserved.                                                      *
00010 *                                                                           *
00011 * This program is free software; you can redistribute it and/or modify      *   
00012 * it under the terms of the GNU General Public License as published by      *
00013 * the Free Software Foundation; either version 2 of the License, or         *
00014 * (at your option) any later version.                                       *
00015 *                                                                           *
00016 * This program is distributed in the hope that it will be useful,           *
00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
00019 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
00020 * for more details.                                                         *
00021 *                                                                           *
00022 ****************************************************************************/
00023 
00024 #ifndef EXPORTER_DAE_H
00025 #define EXPORTER_DAE_H
00026 
00027 #include <wrap/dae/xmldocumentmanaging.h>
00028 #include <wrap/dae/colladaformat.h>
00029 #include <wrap/dae/util_dae.h>
00030 
00031 namespace vcg
00032 {
00033 namespace tri
00034 {
00035 namespace io
00036 {
00037         template<typename MESHMODEL>
00038         class ExporterDAE
00039         {
00040         public:
00041                 static int Save(const MESHMODEL& model,const char* filename,const int mask,const QDomDocument* doc = NULL)
00042                 {
00043                         XMLDocumentWriter stream(filename);
00044                         if (stream.isReliable())
00045                         {
00046                                 XMLDocument* document = Collada::DocumentManager::createColladaDocument(model,mask);
00047                                 stream.write(*document);
00048                                 Collada::DocumentManager::destroyColladaDocument(document);
00049                                 return UtilDAE::E_NOERROR;
00050                         }
00051                         else 
00052                                 return UtilDAE::E_CANTSAVE;
00053                 }
00054 
00055                 static int GetExportMaskCapability()
00056                 {
00057                         int capability = 0;
00058 
00059                         //camera
00060                         //capability |= MeshModel::IOM_CAMERA;
00061 
00062                         //vert
00063                         capability |= Mask::IOM_VERTCOORD;
00064                         capability |= Mask::IOM_VERTNORMAL;
00065                         capability |= Mask::IOM_VERTTEXCOORD;
00066                         capability |= Mask::IOM_VERTCOLOR;
00067                         //face
00068 
00070                         capability |= Mask::IOM_WEDGNORMAL;
00071                         capability |= Mask::IOM_WEDGTEXCOORD;
00072 
00073                         return capability;
00074                 }
00075         };
00076 }
00077 }
00078 }
00079 #endif


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:30:49