IsotropicRemesherPlugin.hh 2.48 KB
Newer Older
Jan Möbius's avatar
 
Jan Möbius committed
1
2
3
4
5
6
7
8
9
10

#ifndef ISOTROPICREMESHERPLUGIN_HH
#define ISOTROPICREMESHERPLUGIN_HH

#include <QtGui>

#include <OpenFlipper/BasePlugin/BaseInterface.hh>
#include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
#include <OpenFlipper/BasePlugin/LoggingInterface.hh>
#include <OpenFlipper/BasePlugin/RPCInterface.hh>
11
#include <OpenFlipper/BasePlugin/ProcessInterface.hh>
Jan Möbius's avatar
 
Jan Möbius committed
12
13
#include <OpenFlipper/common/Types.hh>
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
Jan Möbius's avatar
Jan Möbius committed
14
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
Jan Möbius's avatar
 
Jan Möbius committed
15
16

#include "IsotropicRemesherToolbox.hh"
17
#include "ProgressEmitter.hh"
Jan Möbius's avatar
 
Jan Möbius committed
18
19


20
class IsotropicRemesherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingInterface, RPCInterface, ProcessInterface
Jan Möbius's avatar
 
Jan Möbius committed
21
22
23
24
25
26
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
Q_INTERFACES(ToolboxInterface)
Q_INTERFACES(LoggingInterface)
Q_INTERFACES(RPCInterface)
27
Q_INTERFACES(ProcessInterface)
Jan Möbius's avatar
 
Jan Möbius committed
28

Jan Möbius's avatar
Jan Möbius committed
29

Jan Möbius's avatar
 
Jan Möbius committed
30
signals:
Jan Möbius's avatar
Jan Möbius committed
31
32
  
  //BaseInterface
Jan Möbius's avatar
 
Jan Möbius committed
33
34
35
36
37
38
  void updateView();
  void updatedObject(int);

  void setSlotDescription(QString     _slotName,   QString     _slotDescription,
                          QStringList _parameters, QStringList _descriptions);

Jan Möbius's avatar
Jan Möbius committed
39
  //LoggingInterface:
Jan Möbius's avatar
 
Jan Möbius committed
40
41
42
  void log( Logtype _type, QString _message );
  void log( QString _message );

Jan Möbius's avatar
Jan Möbius committed
43
  // RPC Interface
Jan Möbius's avatar
 
Jan Möbius committed
44
45
  void pluginExists( QString _pluginName , bool& _exists  ) ;
  void functionExists( QString _pluginName , QString _functionName , bool& _exists  );
Jan Möbius's avatar
Jan Möbius committed
46
47
48
  
  // ToolboxInterface
  void addToolbox( QString _name  , QWidget* _widget );   
49
50
51
52
53
54
55
    
  // ProcessInterface 
  void startJob( QString _jobId, QString _description, int _min, int _max, bool _blocking = false);
  void setJobState(QString _jobId, int _value);
  void setJobName(QString _jobId, QString _name);
  void finishJob(QString _jobId);
  void setJobDescription(QString _jobId, QString _description);
Jan Möbius's avatar
 
Jan Möbius committed
56
57
58

private slots:

Jan Möbius's avatar
Jan Möbius committed
59
60
  // BaseInterface
  void initializePlugin();  
Jan Möbius's avatar
 
Jan Möbius committed
61
62
63
64
65
66
67
68
69
70
71
72
  void pluginsInitialized(); // BaseInterface

public :

  ~IsotropicRemesherPlugin() {};

  QString name() { return (QString("IsotropicRemesher")); };
  QString description( ) { return (QString("an isotropic remesher")); };

//GUI
private :
  IsotropicRemesherToolBox* tool_;
73
  double edgeLength_;
Jan Möbius's avatar
 
Jan Möbius committed
74
75
76
77

private slots:
  void slotRemesh();

78
  void slotRemeshButtonClicked();
Jan Möbius's avatar
 
Jan Möbius committed
79
80
81
  void slotSetMinLength();
  void slotSetMaxLength();
  void slotSetMeanLength();
82
83
  
  void threadFinished(QString _jobId);
Jan Möbius's avatar
 
Jan Möbius committed
84
85
86
87
88
89
90
91
92
93
94

//scripting functions
public slots:
  void isotropicRemesh(int _objectID, double _targetEdgeLength );


public slots:
  QString version() { return QString("1.0"); };
};

#endif //ISOTROPICREMESHERPLUGIN_HH