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 #ifndef FILTERDOCSAMPLINGPLUGIN_H
24 #define FILTERDOCSAMPLINGPLUGIN_H
25 
26 #include <common/interfaces.h>
27 
28 class FilterDocSampling : public QObject, public MeshFilterInterface
29 {
30   Q_OBJECT
31   MESHLAB_PLUGIN_IID_EXPORTER(MESH_FILTER_INTERFACE_IID)
32   Q_INTERFACES(MeshFilterInterface)
33 
34   public:
35     enum {
36     FP_ELEMENT_SUBSAMPLING,
37         FP_MONTECARLO_SAMPLING,
38         FP_REGULAR_RECURSIVE_SAMPLING,
39         FP_CLUSTERED_SAMPLING,
40         FP_STRATIFIED_SAMPLING,
41         FP_HAUSDORFF_DISTANCE,
42 		FP_DISTANCE_REFERENCE,
43         FP_TEXEL_SAMPLING,
44         FP_VERTEX_RESAMPLING,
45         FP_UNIFORM_MESH_RESAMPLING,
46         FP_VORONOI_COLORING,
47         FP_DISK_COLORING,
48         FP_POISSONDISK_SAMPLING,
49         FP_POINTCLOUD_SIMPLIFICATION
50   } ;
51 
52   FilterDocSampling();
53 
54   QString filterName(FilterIDType filter) const;
55   QString filterInfo(FilterIDType filter) const;
56   void initParameterSet(QAction *,MeshDocument &/*m*/, RichParameterSet & /*parent*/);
57   bool applyFilter(QAction *filter, MeshDocument &m, RichParameterSet & /*parent*/, vcg::CallBackPos * cb) ;
58   int getRequirements(QAction *action);
59   int postCondition( QAction* ) const;
60   FilterClass getClass(QAction *);
61   FILTER_ARITY filterArity(QAction * filter) const;
62 };
63 
64 #endif
65