1 /****************************************************************************
2 * MeshLab                                                           o o     *
3 * A versatile mesh processing toolbox                             o     o   *
4 *                                                                _   O  _   *
5 * Copyright(C) 2005                                                \/)\/    *
6 * Visual Computing Lab                                            /\/|      *
7 * ISTI - Italian National Research Council                           |      *
8 *                                                                    \      *
9 * All rights reserved.                                                      *
10 *                                                                           *
11 * This program is free software; you can redistribute it and/or modify      *
12 * it under the terms of the GNU General Public License as published by      *
13 * the Free Software Foundation; either version 2 of the License, or         *
14 * (at your option) any later version.                                       *
15 *                                                                           *
16 * This program is distributed in the hope that it will be useful,           *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
19 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
20 * for more details.                                                         *
21 *                                                                           *
22 ****************************************************************************/
23 
24 #ifndef _FILTER_TEXTURE_H
25 #define _FILTER_TEXTURE_H
26 
27 
28 #include <QObject>
29 #include <QTime>
30 
31 #include <common/interfaces.h>
32 #include <vcg/complex/append.h>
33 #include <vcg/complex/algorithms/attribute_seam.h>
34 #include <vcg/complex/algorithms/point_sampling.h>
35 #include <vcg/space/triangle2.h>
36 
37 class FilterTexturePlugin : public QObject, public MeshFilterInterface
38 {
39     Q_OBJECT
40     MESHLAB_PLUGIN_IID_EXPORTER(MESH_FILTER_INTERFACE_IID)
41     Q_INTERFACES(MeshFilterInterface)
42 
43 public:
44     enum {
45         FP_VORONOI_ATLAS,
46         FP_UV_WEDGE_TO_VERTEX,
47         FP_UV_VERTEX_TO_WEDGE,
48         FP_BASIC_TRIANGLE_MAPPING,
49         FP_PLANAR_MAPPING,
50         FP_SET_TEXTURE,
51         FP_COLOR_TO_TEXTURE,
52         FP_TRANSFER_TO_TEXTURE,
53         FP_TEX_TO_VCOLOR_TRANSFER
54     };
55 
56     FilterTexturePlugin();
57 
58     virtual QString filterName(FilterIDType filter) const;
59     virtual QString filterInfo(FilterIDType filter) const;
60     virtual void initParameterSet(QAction *,MeshDocument &/*m*/, RichParameterSet & /*parent*/);
61     virtual bool applyFilter(QAction *filter, MeshDocument &md, RichParameterSet & /*parent*/, vcg::CallBackPos * cb);
62     virtual int getRequirements(QAction *);
63     virtual int getPreConditions(QAction *) const;
64     virtual int postCondition( QAction* ) const;
65     FilterClass getClass(QAction *a);
66     FILTER_ARITY filterArity(QAction * filter) const;
67 };
68 
69 #endif
70