I nuovi seed ora devono essere ad almeno radius dalla mesh.
This commit is contained in:
parent
98d9d02773
commit
7d06710d46
|
|
@ -141,6 +141,7 @@ Pivot(MESH &_mesh, ScalarType _radius, ScalarType _mindist = 0.1, ScalarType _cr
|
||||||
}
|
}
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return false if you want to stop.\n */
|
/* return false if you want to stop.\n */
|
||||||
void buildMesh(CallBackPos *call = NULL, int interval = 512) {
|
void buildMesh(CallBackPos *call = NULL, int interval = 512) {
|
||||||
bool done = false;
|
bool done = false;
|
||||||
|
|
@ -188,6 +189,18 @@ bool seed(bool outside = true, int start = -1) {
|
||||||
//some maximum tries. im lazy.
|
//some maximum tries. im lazy.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
//find the closest visited or boundary
|
||||||
|
for(int i = 0; i < n; i++) {
|
||||||
|
if(dists[i] < radius) {
|
||||||
|
int id = targets[i];
|
||||||
|
CVertex &v = mesh.vert[id];
|
||||||
|
if(v.IsB() || v.IsV()) {
|
||||||
|
mesh.vert[start].SetD();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int v0, v1, v2;
|
int v0, v1, v2;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
//find a triplet that does not contains any other point
|
//find a triplet that does not contains any other point
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue