-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglwidget.h
executable file
·40 lines (34 loc) · 942 Bytes
/
glwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <GL/glew.h>
#include <QGLWidget>
#include <stdio.h>
#include "branch.h"
#include <QEvent>
#include <QMouseEvent>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace cv;
using namespace std;
class GLwidget : public QGLWidget
{
Q_OBJECT
protected:
void initializeGL();
void paintGL();
void resizeGL(int w, int h);
void mousePressEvent(QMouseEvent *ev);
void mouseMoveEvent(QMouseEvent *ev);
void mouseReleaseEvent(QMouseEvent *ev);
public:
explicit GLwidget(QWidget *parent = 0);
Branch drawnBranch[100];
void drawPrevBranch();
void drawPolyBranch_k(GLfloat branch_points[],int size);
void findParent(float childx, float childy);
void replacebyEqui(int find, int replace);
bool test(int i, int j);
void replacebySimi(int find, int replace);
void clearScreen();
};
#endif // GLWIDGET_H