subdivideSurface.h 1.34 KB
Newer Older
1 2
#ifndef _SUBDIVIDESURFACE_PLUGIN_H_
#define _SUBDIVIDESURFACE_PLUGIN_H_
3 4

#include "plugin.h"
5
#include "subdivideSurfaceDialog.h"
6

7 8
namespace CGoGN
{
9

10 11
namespace SCHNApps
{
Pierre Kraemer's avatar
Pierre Kraemer committed
12

13
class SubdivideSurfacePlugin : public Plugin
14 15
{
	Q_OBJECT
Pierre Kraemer's avatar
Pierre Kraemer committed
16
	Q_INTERFACES(CGoGN::SCHNApps::Plugin)
17 18

public:
19
	SubdivideSurfacePlugin()
20 21 22 23
	{
		setProvidesRendering(false);
	}

24
	~SubdivideSurfacePlugin()
25 26
	{}

27
	virtual bool enable();
28
	virtual void disable() {}
29 30 31

	virtual void redraw(View *view) {}

32 33 34 35 36 37
	virtual void keyPress(View* view, QKeyEvent* event) {}
	virtual void keyRelease(View* view, QKeyEvent* event) {}
	virtual void mousePress(View* view, QMouseEvent* event) {}
	virtual void mouseRelease(View* view, QMouseEvent* event) {}
	virtual void mouseMove(View* view, QMouseEvent* event) {}
	virtual void wheelEvent(View* view, QWheelEvent* event) {}
38

39
public slots:
40
	void openSubdivideSurfaceDialog();
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
	void subdivideSurfaceFromDialog();

	void loopSubdivision(
		const QString& mapName,
		const QString& positionAttributeName = "position"
	);
	void CCSubdivision(
		const QString& mapName,
		const QString& positionAttributeName = "position"
	);
	void trianguleFaces(
		const QString& mapName,
		const QString& positionAttributeName = "position"
	);

56 57
private:
	SubdivideSurfaceDialog* m_subdivideSurfaceDialog;
Pierre Kraemer's avatar
Pierre Kraemer committed
58

59
	QAction* m_subdivideSurfaceAction;
60 61
};

62 63 64 65
} // namespace SCHNApps

} // namespace CGoGN

66
#endif