*** empty log message ***

This commit is contained in:
Federico Ponchio 2007-06-15 15:04:43 +00:00
parent 74d325979b
commit ec52ffd973
2 changed files with 5 additions and 17 deletions

View File

@ -9,8 +9,6 @@
namespace vcg {
namespace tri {
extern FILE *fp;
class FrontEdge {
public:
@ -85,7 +83,7 @@ protected:
//HACK to speed up things until i can use a seach structure
// int i = mesh.face.size() - 4*(front.size());
// if(front.size() < 100) i = mesh.face.size() - 100;
i = 0;
int i = 0;
if(i < 0) i = 0;
for(; i < (int)mesh.face.size(); i++) {
FaceType &f = mesh.face[i];
@ -189,6 +187,7 @@ public:
std::list<FrontEdge>::iterator touch = front.end();
int v2 = Place(current, touch);
if(v2 == -1) {
KillEdge(ei);
return false;
@ -196,13 +195,12 @@ public:
assert(v2 != v0 && v2 != v1);
if(touch != front.end()) {
if(touch != front.end()) {
//check for orientation and manifoldness
//touch == current.previous?
if(v2 == previous.v0) {
if(!CheckEdge(v2, v1)) {
fprintf(fp, "killing\n");
KillEdge(ei);
return false;
}
@ -230,7 +228,6 @@ public:
//touch == (*current.next).next
} else if(v2 == next.v1) {
if(!CheckEdge(v0, v2)) {
fprintf(fp, "killing\n");
KillEdge(ei);
return false;
}

View File

@ -14,8 +14,6 @@
*/
namespace vcg {
namespace tri {
FILE *fp;
template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
public:
@ -54,12 +52,8 @@ template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
if(radius == 0)
radius = sqrt((this->mesh.bbox.Diag()*this->mesh.bbox.Diag())/this->mesh.vn);
else
radius *= this->mesh.bbox.Diag()/100;
fp = fopen("prova.txt", "wb+");
fprintf(fp, "radius %lf\n", radius);
radius *= this->mesh.bbox.Diag()/100;
min_edge *= radius;
max_edge *= radius;
@ -205,7 +199,6 @@ template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
//select a new vertex, mark as Visited and mark as usedBit all neighbours (less than min_edge)
int Place(FrontEdge &edge, std::list<FrontEdge>::iterator &touch) {
fprintf(fp, "place front.size() %d\n", this->front.size());
Point3x v0 = this->mesh.vert[edge.v0].P();
Point3x v1 = this->mesh.vert[edge.v1].P();
Point3x v2 = this->mesh.vert[edge.v2].P();
@ -312,9 +305,7 @@ template <class MESH> class BallPivoting: public AdvancingFront<MESH> {
if(normal * newnormal < max_angle || this->nb[id] >= 2) {
return -1;
}
fprintf(fp, "isB: %d\n", candidate->IsB());
//test if id is in some border (to return touch
for(list<FrontEdge>::iterator k = this->front.begin(); k != this->front.end(); k++)
if((*k).v0 == id) touch = k;