-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharmadillo.h
70 lines (59 loc) · 1.41 KB
/
armadillo.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
69
70
#ifndef ARMADILLO_H
#define ARMADILLO_H
#include <QObject>
#include <gl/glut.h>
#include <vector>
#include "common.h"
#include "..\Matrix\Matrix\Spatrix.h"
class armadillo : public QObject
{
Q_OBJECT
public:
explicit armadillo(QObject *parent = 0);
~armadillo();
void draw_scene();
void draw_vertex();
void setptr(int p);
int getptr();
void movevertex(float x,float y,float z);
void setfixv(int p);
void setalpha(int value);
void setmethod(int m);
void setradius(int r);
int reselect(); //返回当前的armadillo选点方法
void laplacian(int t);
void transform();
void initialTrans();
void InitialModel(QString filename);
void Export(QString Exportname);
void up();
void down();
void left();
void right();
private:
int cptr;
int fixv[20];//数组fixv记录指定不变的点的index, fixv_num是点的数量
int fixv_num;
float alpha; //两个约束的权重,数值为0到1,由UI上设计一个滑块控制
int select; //当前选择的点是固定点还是移动点,1为固定点,0为移动点
int method;
float radius;
Matrix * vertex;
Matrix * normal;
int * face;
int nvertex, nface;
//method 3
std::vector<float> * coff;
std::vector<int> * topo;
Matrix * face_normal;
Spatrix sLtL, sAtA, sA;
Spatrix sL, sLt;
Matrix *LtLx, *cLtLx;
Matrix *A, *xhat, *len;
Matrix * ori, * Lx;
signals:
public slots:
void refreshfix();//删除已选的固定点
void cselect(bool value);//改变当前的选点方法
};
#endif // ARMADILLO_H