@@ -35,7 +35,7 @@ list <int> explore_boundary(HalfedgeDS he, int v, int r, MatrixXi R) {
35
35
}
36
36
37
37
38
- int add_anchors_on_edge (HalfedgeDS he, int anchor, int r, MatrixXi R, MatrixXd V, VectorXi& anchors, MatrixXd Proxies) {
38
+ int add_anchors_on_edge (HalfedgeDS he, int anchor, int r, MatrixXi R, MatrixXd V, VectorXi& anchors, MatrixXd Proxies, double treshold ) {
39
39
// modifies anchors to add anchors on edge
40
40
int k = 0 ; // number of new anchors
41
41
@@ -70,7 +70,7 @@ int add_anchors_on_edge(HalfedgeDS he, int anchor, int r, MatrixXi R, MatrixXd V
70
70
max_v = new_v;
71
71
}
72
72
}
73
- if (max_d>0.4 ) { // treshold
73
+ if (max_d>treshold ) { // treshold
74
74
anchors (max_v) = 1 ;
75
75
k++;
76
76
}
@@ -117,7 +117,7 @@ vector<int> find_vertex_proxies(HalfedgeDS he, int v, MatrixXi R) {
117
117
}
118
118
119
119
120
- vector<vector<int >> anchor_points (HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixXd Proxies) {
120
+ vector<vector<int >> anchor_points (HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixXd Proxies, double treshold ) {
121
121
int n = V.rows ();
122
122
int p = Proxies.rows ()/2 ;
123
123
vector<vector<int >> vertex_proxies (n); // list of proxies
@@ -146,10 +146,10 @@ vector<vector<int>> anchor_points(HalfedgeDS he, MatrixXi R, MatrixXd V, MatrixX
146
146
r = vertex_proxies[i][m];
147
147
if (seen (r)==0 ) {
148
148
seen (r)=1 ;
149
- kv = add_anchors_on_edge (he,i,r,R,V,anchors, Proxies);
149
+ kv = add_anchors_on_edge (he,i,r,R,V,anchors, Proxies,treshold );
150
150
while (kv>0 ) {
151
151
k += kv;
152
- kv = add_anchors_on_edge (he,i,r,R,V,anchors, Proxies);
152
+ kv = add_anchors_on_edge (he,i,r,R,V,anchors, Proxies,treshold );
153
153
}
154
154
}
155
155
}
0 commit comments