1
/****************************************************************************
3
* A versatile mesh processing toolbox o o *
5
* Copyright(C) 2005 \/)\/ *
6
* Visual Computing Lab /\/| *
7
* ISTI - Italian National Research Council | *
9
* All rights reserved. *
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. *
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) *
22
****************************************************************************/
23
#ifndef SAMPLE_DECORATE_PLUGIN_H
24
#define SAMPLE_DECORATE_PLUGIN_H
32
//#include <QGLWidget>
33
#include <meshlab/interfaces.h>
35
#include <meshlab/meshmodel.h>
36
#include <meshlab/glarea.h>
37
//#include <wrap/gl/addons.h>
38
#include "decorate_shader.h"
39
#include "shadow_mapping.h"
40
#include "variance_shadow_mapping.h"
41
#include "variance_shadow_mapping_blur.h"
44
class DecorateShadowPlugin : public QObject, public MeshDecorateInterface
47
Q_INTERFACES(MeshDecorateInterface)
48
virtual const QString Info(QAction *);
51
DP_SHOW_SIMPLE_SHADOW,
53
DP_SHOW_VSM_SHADOW_BLUR,
54
DP_SHOW_AO_DEPTH_TRICK,
58
virtual const QString ST(FilterIDType filter) const;
62
DecorateShadowPlugin()
65
DP_SHOW_SIMPLE_SHADOW <<
67
DP_SHOW_VSM_SHADOW_BLUR <<
71
foreach(tt , types()){
72
actionList << new QAction(ST(tt), this);
75
foreach(ap,actionList){
76
ap->setCheckable(true);
80
QList<QAction *> actions () const {return actionList;}
81
virtual bool StartDecorate(QAction * /*mode*/, MeshModel &/*m*/, GLArea * /*parent*/);
82
virtual void Decorate(QAction *a, MeshModel &m, FilterParameterSet * /*parent*/ par, GLArea *gla,QFont qf);
83
virtual void initGlobalParameterSet(QAction *, FilterParameterSet * /*globalparam*/);
85
DecorateShader* _decorator;