-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeshbuilder.h
68 lines (52 loc) · 1.39 KB
/
meshbuilder.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef MESHBUILDER_H
#define MESHBUILDER_H
#include <QWidget>
#include <QGroupBox>
#include <QInputDialog>
#include <QSpinBox>
#include <QLabel>
#include "mesh.h"
#include "webcamwidget.h"
#include "facedetector.h"
#include "fastm.h"
#include "shapefs.h"
#include "facedatabasewidget.h"
class MeshBuilder : public QWidget
{
Q_OBJECT
public:
explicit MeshBuilder(QWidget *parent = 0);
~MeshBuilder();
Mesh m_mesh;
GLWidget *meshViewer;
WebcamWidget *imageViewer;
Facedet *detector;
Shapefs *sfs;
Fastm *fastmarch;
FaceDatabaseWidget *database;
QGroupBox* menu();
int subdivNum() { return m_subdivNum; }
float edgeTol() {return m_edgeTol; }
QString subdivType() {return m_subdivType;}
signals:
public slots:
void buildMesh();
void convertToNonAdaptive();
void saveMesh();
void loadMesh();
void applyTexture();
void setSubdivNum(int val) {m_subdivNum = val;}
void setEdgeTolerance(double val) {m_edgeTol = val;}
void setSubdivType(QString val) {m_subdivType = val;}
void setGridType(QString val) {m_gridType = val;}
void updateMesh();
private:
Mesh buildMeshFromFace();
Mesh buildMeshFromImage();
bool findMatchingTriangle(QVector3D p, float barCoords[3], unsigned int &firstIndex);
int m_subdivNum;
float m_edgeTol;
QString m_subdivType;
QString m_gridType;
};
#endif // MESHBUILDER_H