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

#include "plugin.h"
5 6

#include "subdivideSurfaceDialog.h"
7 8


Pierre Kraemer's avatar
Pierre Kraemer committed
9 10 11 12
using namespace CGoGN;
using namespace SCHNApps;


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 32 33 34 35 36 37 38

	virtual void redraw(View *view) {}

	virtual void keyPress(View* view, int key) {}
	virtual void keyRelease(View* view, int key) {}
	virtual void mousePress(View* view, int button, int x, int y) {}
	virtual void mouseRelease(View* view, int button, int x, int y) {}
	virtual void mouseMove(View* view, int buttons, int x, int y) {}
	virtual void wheelEvent(View* view, int delta, int x, int y) {}

39
public slots:
40 41
	void openSubdivideSurfaceDialog();
	void subdivideSurface();
42 43 44 45 46 47 48

	void loopSubdivision(PFP2::MAP* map, VertexAttribute<PFP2::VEC3>& position);
	void CCSubdivision(PFP2::MAP* map, VertexAttribute<PFP2::VEC3>& position);
	void trianguleFaces(PFP2::MAP* map, VertexAttribute<PFP2::VEC3>& position);

private:
	SubdivideSurfaceDialog* m_subdivideSurfaceDialog;
Pierre Kraemer's avatar
Pierre Kraemer committed
49

50
	QAction* m_subdivideSurfaceAction;
51 52
};

53
#endif