~ubuntu-branches/ubuntu/lucid/meshlab/lucid

« back to all changes in this revision

Viewing changes to meshlab/src/fgt/decorate_shadow/decorate_shadow.h

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-10-08 16:40:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091008164041-0c2ealqv8b8uc20c
Tags: 1.2.2-1
* New upstream version
* Do not build filter_isoparametrization because liblevmar dependency
  is not (yet) in Debian
* Fix compilation with gcc-4.4, thanks to Jonathan Liu for the patch
  (closes: #539544)
* rules: Add compiler variables to the qmake call (for testing with new
  GCC versions)
* io_3ds.pro: Make LIBS and INCLUDEPATH point to Debian version of lib3ds
* io_epoch.pro: Make LIBS point to Debian version of libbz2
* control:
  - Move Homepage URL to the source package section
  - Update to standards-version 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 SAMPLE_DECORATE_PLUGIN_H
 
24
#define SAMPLE_DECORATE_PLUGIN_H
 
25
 
 
26
#include <QObject>
 
27
#include <QAction>
 
28
#include <QList>
 
29
#include <math.h>
 
30
#include <limits>
 
31
#include <stdlib.h>
 
32
//#include <QGLWidget>
 
33
#include <meshlab/interfaces.h>
 
34
#include <QtGui>
 
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"
 
42
#include "ssao.h"
 
43
 
 
44
class DecorateShadowPlugin : public QObject, public MeshDecorateInterface
 
45
{
 
46
  Q_OBJECT
 
47
  Q_INTERFACES(MeshDecorateInterface)
 
48
  virtual const QString Info(QAction *);
 
49
  
 
50
  enum {
 
51
                DP_SHOW_SIMPLE_SHADOW,
 
52
                DP_SHOW_VSM_SHADOW,
 
53
                DP_SHOW_VSM_SHADOW_BLUR,
 
54
                DP_SHOW_AO_DEPTH_TRICK,
 
55
                DP_SHOW_SSAO
 
56
                };
 
57
 
 
58
  virtual const QString ST(FilterIDType filter) const;
 
59
 
 
60
public:
 
61
     
 
62
        DecorateShadowPlugin()
 
63
        {
 
64
    typeList <<
 
65
            DP_SHOW_SIMPLE_SHADOW <<
 
66
            DP_SHOW_VSM_SHADOW <<
 
67
            DP_SHOW_VSM_SHADOW_BLUR <<
 
68
            DP_SHOW_SSAO;
 
69
 
 
70
    FilterIDType tt;
 
71
    foreach(tt , types()){
 
72
              actionList << new QAction(ST(tt), this);
 
73
    }
 
74
    QAction *ap;
 
75
    foreach(ap,actionList){
 
76
        ap->setCheckable(true);
 
77
    }
 
78
  }
 
79
 
 
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*/);
 
84
private:
 
85
    DecorateShader* _decorator;
 
86
};
 
87
 
 
88
#endif