-
Notifications
You must be signed in to change notification settings - Fork 1
/
PatchPreview.hh
59 lines (44 loc) · 1.31 KB
/
PatchPreview.hh
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
//
// Created by wuschelbueb on 06.10.22.
//
#ifndef OPENFLIPPER_PATCHPREVIEW_HH
#define OPENFLIPPER_PATCHPREVIEW_HH
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <OpenMesh/Core/Geometry/EigenVectorT.hh>
#include <OpenMesh/Core/Utils/PropertyManager.hh>
#include <MeshTools/MeshSelectionT.hh>
#include <QtOpenGL>
#include <functional>
#include <stdexcept>
#include <iostream>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/Eigenvalues>
#include <gmm/gmm.h>
#include <vector>
#include <float.h>
#include <cmath>
class PatchPreview {
public:
/*
* is the same as:
* Crossfield(TriMesh &trimesh, std::vector<int> &heInRange) {
* trimesh_ = trimesh;
* heInRange_ = heInRange;
* }
*/
PatchPreview(TriMesh &trimesh)
: trimesh_{trimesh} {
}
~PatchPreview() {
}
void getCurvature();
private:
TriMesh &trimesh_;
void get2RingFaceNeighbours(std::vector<OpenMesh::FaceHandle> &twoRingFaces, OpenMesh::VertexHandle vh);
void getParams();
void calculateCurvature();
double calculateArea(std::vector<OpenMesh::FaceHandle> twoRingfaces);
std::vector<OpenMesh::HalfedgeHandle> getTwoRingHe(std::vector<OpenMesh::FaceHandle> twoRingFaces);
OpenMesh::VertexHandle getSelectedVertex();
};
#endif //OPENFLIPPER_PATCHPREVIEW_HH