updated callback function for ball pivoting.
This commit is contained in:
parent
bc14f81543
commit
904f0d9d3a
|
|
@ -74,20 +74,21 @@ template <class MESH> class AdvancingFront {
|
||||||
virtual ScalarType radi() { return 0; }
|
virtual ScalarType radi() { return 0; }
|
||||||
|
|
||||||
void BuildMesh(CallBackPos call = NULL, int interval = 512) {
|
void BuildMesh(CallBackPos call = NULL, int interval = 512) {
|
||||||
while(1) {
|
float finalfacesext = mesh.vert.size() * 2.0f;
|
||||||
if(call) call(0, "Advancing front");
|
if(call) call(0, "Advancing front");
|
||||||
|
while(1) {
|
||||||
|
|
||||||
for(int i = 0; i < interval; i++) {
|
for(int i = 0; i < interval; i++) {
|
||||||
if(!front.size() && !SeedFace()) return;
|
if(!front.size() && !SeedFace()) return;
|
||||||
AddFace();
|
AddFace();
|
||||||
if(call)
|
if(call)
|
||||||
{
|
{
|
||||||
float rap = float(i) / float(interval);
|
float rap = float(mesh.face.size()) / finalfacesext;
|
||||||
int perc = (int) (100.0f * rap);
|
int perc = (int) (100.0f * rap);
|
||||||
(*call)(perc,"Ball Pivoting Rolling: Adding Faces");
|
(*call)(perc,"Adding Faces");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (call) (*call)(100,"Complete");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue