Ignore:
Timestamp:
Mar 18, 2010, 11:33:54 AM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
6acc8e4
Parents:
f87c2a
git-author:
Frederik Heber <heber@…> (03/18/10 10:26:55)
git-committer:
Frederik Heber <heber@…> (03/18/10 11:33:54)
Message:

Log() and eLog() are prepended by a DoLog()/DoeLog() construct.

  • Most of the run time (95%) is spent on verbosity that it is discarded anyway due to a low verbosity setting. However, the operator << is evaluated from the right-hand side, hence the whole message is constructed and then thrown away.
  • DoLog() and DoeLog() are new functions that check the verbosity beforehand and are used as follows: DoLog(2) && (Log() << verbose(2) << "message" << endl);

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselation.cpp

    rf87c2a r12f57b  
    5555  //Log() << Verbose(0) << "Erasing point nr. " << Nr << "." << endl;
    5656  if (!lines.empty())
    57     eLog() << Verbose(2) << "Memory Leak! I " << *this << " am still connected to some lines." << endl;
     57    DoeLog(2) && (eLog()<< Verbose(2) << "Memory Leak! I " << *this << " am still connected to some lines." << endl);
    5858  node = NULL;
    5959};
     
    188188  }
    189189  if (!triangles.empty())
    190     eLog() << Verbose(2) << "Memory Leak! I " << *this << " am still connected to some triangles." << endl;
     190    DoeLog(2) && (eLog()<< Verbose(2) << "Memory Leak! I " << *this << " am still connected to some triangles." << endl);
    191191};
    192192
     
    226226  // get the two triangles
    227227  if (triangles.size() != 2) {
    228     eLog() << Verbose(0) << "Baseline " << *this << " is connected to less than two triangles, Tesselation incomplete!" << endl;
     228    DoeLog(0) && (eLog()<< Verbose(0) << "Baseline " << *this << " is connected to less than two triangles, Tesselation incomplete!" << endl);
    229229    return true;
    230230  }
     
    252252      BaseLineNormal.CopyVector(&runner->second->NormalVector);   // yes, copy second on top of first
    253253    else {
    254       eLog() << Verbose(0) << "Triangle " << *runner->second << " has zero normal vector!" << endl;
     254      DoeLog(0) && (eLog()<< Verbose(0) << "Triangle " << *runner->second << " has zero normal vector!" << endl);
    255255    }
    256256    node = runner->second->GetThirdEndpoint(this);
     
    263263      i++;
    264264    } else {
    265       eLog() << Verbose(1) << "I cannot find third node in triangle, something's wrong." << endl;
     265      DoeLog(1) && (eLog()<< Verbose(1) << "I cannot find third node in triangle, something's wrong." << endl);
    266266      return true;
    267267    }
     
    368368  }
    369369  if (Counter < 3) {
    370     eLog() << Verbose(0) << "We have a triangle with only two distinct endpoints!" << endl;
     370    DoeLog(0) && (eLog()<< Verbose(0) << "We have a triangle with only two distinct endpoints!" << endl);
    371371    performCriticalExit();
    372372  }
     
    430430
    431431  if (!Intersection->GetIntersectionWithPlane(&NormalVector, endpoints[0]->node->node, MolCenter, x)) {
    432     eLog() << Verbose(1) << "Alas! Intersection with plane failed - at least numerically - the intersection is not on the plane!" << endl;
     432    DoeLog(1) && (eLog()<< Verbose(1) << "Alas! Intersection with plane failed - at least numerically - the intersection is not on the plane!" << endl);
    433433    return false;
    434434  }
     
    726726      Runner[i]++;
    727727      if (Runner[i] == endpoints.end()) {
    728         eLog() << Verbose(0) << "There are less than three endpoints in the polygon!" << endl;
     728        DoeLog(0) && (eLog()<< Verbose(0) << "There are less than three endpoints in the polygon!" << endl);
    729729        performCriticalExit();
    730730      }
     
    10721072      runner->second = NULL;
    10731073    } else
    1074       eLog() << Verbose(1) << "The triangle " << runner->first << " has already been free'd." << endl;
     1074      DoeLog(1) && (eLog()<< Verbose(1) << "The triangle " << runner->first << " has already been free'd." << endl);
    10751075  }
    10761076  Log() << Verbose(0) << "This envelope was written to file " << TriangleFilesWritten << " times(s)." << endl;
     
    13251325  else
    13261326    {
    1327       eLog() << Verbose(0) << "No starting triangle found." << endl;
     1327      DoeLog(0) && (eLog()<< Verbose(0) << "No starting triangle found." << endl);
    13281328    }
    13291329}
     
    15241524          TrianglesOnBoundaryCount++;
    15251525        } else {
    1526           eLog() << Verbose(2) << "I could not determine a winner for this baseline " << *(baseline->second) << "." << endl;
     1526          DoeLog(2) && (eLog()<< Verbose(2) << "I could not determine a winner for this baseline " << *(baseline->second) << "." << endl);
    15271527        }
    15281528
     
    16171617            if (NewLines[j]->IsConnectedTo(BLS[0])) {
    16181618              if (n>2) {
    1619                 eLog() << Verbose(2) << BLS[0] << " connects to all of the new lines?!" << endl;
     1619                DoeLog(2) && (eLog()<< Verbose(2) << BLS[0] << " connects to all of the new lines?!" << endl);
    16201620                return false;
    16211621              } else
     
    16341634      }
    16351635    } else { // something is wrong with FindClosestTriangleToPoint!
    1636       eLog() << Verbose(1) << "The closest triangle did not produce an intersection!" << endl;
     1636      DoeLog(1) && (eLog()<< Verbose(1) << "The closest triangle did not produce an intersection!" << endl);
    16371637      return false;
    16381638    }
     
    17371737          OpenLines.erase(CandidateLine);
    17381738        } else {
    1739           eLog() << Verbose(1) << "Line exists and is attached to less than two triangles, but not in OpenLines!" << endl;
     1739          DoeLog(1) && (eLog()<< Verbose(1) << "Line exists and is attached to less than two triangles, but not in OpenLines!" << endl);
    17401740        }
    17411741
     
    18431843      triangle->lines[i] = NULL;  // free'd or not: disconnect
    18441844    } else
    1845       eLog() << Verbose(1) << "This line " << i << " has already been free'd." << endl;
     1845      DoeLog(1) && (eLog()<< Verbose(1) << "This line " << i << " has already been free'd." << endl);
    18461846  }
    18471847
     
    18971897      line->endpoints[i] = NULL;  // free'd or not: disconnect
    18981898    } else
    1899       eLog() << Verbose(1) << "Endpoint " << i << " has already been free'd." << endl;
     1899      DoeLog(1) && (eLog()<< Verbose(1) << "Endpoint " << i << " has already been free'd." << endl);
    19001900  }
    19011901  if (!line->triangles.empty())
    1902     eLog() << Verbose(2) << "Memory Leak! I " << *line << " am still connected to some triangles." << endl;
     1902    DoeLog(2) && (eLog()<< Verbose(2) << "Memory Leak! I " << *line << " am still connected to some triangles." << endl);
    19031903
    19041904  if (LinesOnBoundary.erase(line->Nr))
     
    20732073          }
    20742074        } else {
    2075           eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl;
     2075          DoeLog(1) && (eLog()<< Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl);
    20762076        }
    20772077      }
     
    22172217//            if (fabs(OldSphereCenter.ScalarProduct(&SearchDirection)) > HULLEPSILON) {
    22182218//              // rotated the wrong way!
    2219 //              eLog() << Verbose(1) << "SearchDirection and RelativeOldSphereCenter are still not orthogonal!" << endl;
     2219//              DoeLog(1) && (eLog()<< Verbose(1) << "SearchDirection and RelativeOldSphereCenter are still not orthogonal!" << endl);
    22202220//            }
    22212221//
     
    22742274//          }
    22752275//        } else {
    2276 //          eLog() << Verbose(2) << "Baseline is connected to two triangles already?" << endl;
     2276//          DoeLog(2) && (eLog()<< Verbose(2) << "Baseline is connected to two triangles already?" << endl);
    22772277//        }
    22782278//      } else {
     
    22812281//    }
    22822282//  } else {
    2283 //    eLog() << Verbose(1) << "Could not find the TesselPoint " << *ThirdNode << "." << endl;
     2283//    DoeLog(1) && (eLog()<< Verbose(1) << "Could not find the TesselPoint " << *ThirdNode << "." << endl);
    22842284//  }
    22852285//
     
    23472347    if (fabs(RelativeSphereCenter.ScalarProduct(&SearchDirection)) > HULLEPSILON) {
    23482348      // rotated the wrong way!
    2349       eLog() << Verbose(1) << "SearchDirection and RelativeOldSphereCenter are still not orthogonal!" << endl;
     2349      DoeLog(1) && (eLog()<< Verbose(1) << "SearchDirection and RelativeOldSphereCenter are still not orthogonal!" << endl);
    23502350    }
    23512351
     
    23582358
    23592359  if (CandidateLine.pointlist.empty()) {
    2360     eLog() << Verbose(2) << "Could not find a suitable candidate." << endl;
     2360    DoeLog(2) && (eLog()<< Verbose(2) << "Could not find a suitable candidate." << endl);
    23612361    return false;
    23622362  }
     
    24002400//          CandidateLine.ShortestAngle = ShortestAngle;
    24012401//        } else {
    2402 ////          eLog() << Verbose(1) << "This triangle consisting of ";
     2402////          DoeLog(1) && (eLog()<< Verbose(1) << "This triangle consisting of ");
    24032403////          Log() << Verbose(0) << *(*it)->point << ", ";
    24042404////          Log() << Verbose(0) << *BaseRay->endpoints[0]->node << " and ";
     
    24212421//
    24222422//          } else {
    2423 ////            eLog() << Verbose(1) << "This triangle consisting of " << *(*it)->point << ", " << *BaseRay->endpoints[0]->node << " and " << *BaseRay->endpoints[1]->node << " " << "exists and is not added, as it does not seem helpful!" << endl;
     2423////            DoeLog(1) && (eLog()<< Verbose(1) << "This triangle consisting of " << *(*it)->point << ", " << *BaseRay->endpoints[0]->node << " and " << *BaseRay->endpoints[1]->node << " " << "exists and is not added, as it does not seem helpful!" << endl);
    24242424//            result = false;
    24252425//          }
     
    24372437//    BaseRay = BLS[0];
    24382438//    if ((BTS != NULL) && (BTS->NormalVector.NormSquared() < MYEPSILON)) {
    2439 //      eLog() << Verbose(1) << "Triangle " << *BTS << " has zero normal vector!" << endl;
     2439//      DoeLog(1) && (eLog()<< Verbose(1) << "Triangle " << *BTS << " has zero normal vector!" << endl);
    24402440//      exit(255);
    24412441//    }
     
    26352635    BaseLineNormal.Zero();
    26362636    if (Base->triangles.size() < 2) {
    2637       eLog() << Verbose(1) << "Less than two triangles are attached to this baseline!" << endl;
     2637      DoeLog(1) && (eLog()<< Verbose(1) << "Less than two triangles are attached to this baseline!" << endl);
    26382638      return 0.;
    26392639    }
     
    26742674  BaseLineNormal.Zero();
    26752675  if (Base->triangles.size() < 2) {
    2676     eLog() << Verbose(1) << "Less than two triangles are attached to this baseline!" << endl;
     2676    DoeLog(1) && (eLog()<< Verbose(1) << "Less than two triangles are attached to this baseline!" << endl);
    26772677    return NULL;
    26782678  }
     
    27102710  // check whether everything is in place to create new lines and triangles
    27112711  if (i<4) {
    2712     eLog() << Verbose(1) << "We have not gathered enough baselines!" << endl;
     2712    DoeLog(1) && (eLog()<< Verbose(1) << "We have not gathered enough baselines!" << endl);
    27132713    return NULL;
    27142714  }
    27152715  for (int j=0;j<4;j++)
    27162716    if (OldLines[j] == NULL) {
    2717       eLog() << Verbose(1) << "We have not gathered enough baselines!" << endl;
     2717      DoeLog(1) && (eLog()<< Verbose(1) << "We have not gathered enough baselines!" << endl);
    27182718      return NULL;
    27192719    }
    27202720  for (int j=0;j<2;j++)
    27212721    if (OldPoints[j] == NULL) {
    2722       eLog() << Verbose(1) << "We have not gathered enough endpoints!" << endl;
     2722      DoeLog(1) && (eLog()<< Verbose(1) << "We have not gathered enough endpoints!" << endl);
    27232723      return NULL;
    27242724    }
     
    27642764    Log() << Verbose(0) << "INFO: Created new triangle " << *BTS << "." << endl;
    27652765  } else {
    2766     eLog() << Verbose(0) << "The four old lines do not connect, something's utterly wrong here!" << endl;
     2766    DoeLog(0) && (eLog()<< Verbose(0) << "The four old lines do not connect, something's utterly wrong here!" << endl);
    27672767    return NULL;
    27682768  }
     
    27952795      N[i] = LC->n[i];
    27962796  } else {
    2797     eLog() << Verbose(1) << "Point " << *a << " is not found in cell " << LC->index << "." << endl;
     2797    DoeLog(1) && (eLog()<< Verbose(1) << "Point " << *a << " is not found in cell " << LC->index << "." << endl);
    27982798    return;
    27992799  }
     
    29352935    // test whether old center is on the band's plane
    29362936    if (fabs(RelativeOldSphereCenter.ScalarProduct(&CirclePlaneNormal)) > HULLEPSILON) {
    2937       eLog() << Verbose(1) << "Something's very wrong here: RelativeOldSphereCenter is not on the band's plane as desired by " << fabs(RelativeOldSphereCenter.ScalarProduct(&CirclePlaneNormal)) << "!" << endl;
     2937      DoeLog(1) && (eLog()<< Verbose(1) << "Something's very wrong here: RelativeOldSphereCenter is not on the band's plane as desired by " << fabs(RelativeOldSphereCenter.ScalarProduct(&CirclePlaneNormal)) << "!" << endl);
    29382938      RelativeOldSphereCenter.ProjectOntoPlane(&CirclePlaneNormal);
    29392939    }
     
    29452945      Log() << Verbose(1) << "INFO: SearchDirection is " << SearchDirection << "." << endl;
    29462946      if (fabs(RelativeOldSphereCenter.ScalarProduct(&SearchDirection)) > HULLEPSILON) {  // rotated the wrong way!
    2947         eLog() << Verbose(1) << "SearchDirection and RelativeOldSphereCenter are not orthogonal!" << endl;
     2947        DoeLog(1) && (eLog()<< Verbose(1) << "SearchDirection and RelativeOldSphereCenter are not orthogonal!" << endl);
    29482948      }
    29492949
     
    29542954        //Log() << Verbose(1) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl;
    29552955      } else {
    2956         eLog() << Verbose(1) << "Vector " << CircleCenter << " is outside of LinkedCell's bounding box." << endl;
     2956        DoeLog(1) && (eLog()<< Verbose(1) << "Vector " << CircleCenter << " is outside of LinkedCell's bounding box." << endl);
    29572957        return;
    29582958      }
     
    29932993                      otherradius = CandidateLine.BaseLine->endpoints[1]->node->node->DistanceSquared(&NewPlaneCenter);
    29942994                      if (fabs(radius - otherradius) > HULLEPSILON) {
    2995                         eLog() << Verbose(1) << "Distance to center of circumcircle is not the same from each corner of the triangle: " << fabs(radius-otherradius) << endl;
     2995                        DoeLog(1) && (eLog()<< Verbose(1) << "Distance to center of circumcircle is not the same from each corner of the triangle: " << fabs(radius-otherradius) << endl);
    29962996                      }
    29972997                      // construct both new centers
     
    30603060          }
    30613061    } else {
    3062       eLog() << Verbose(1) << "The projected center of the old sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;
     3062      DoeLog(1) && (eLog()<< Verbose(1) << "The projected center of the old sphere has radius " << radius << " instead of " << CircleRadius << "." << endl);
    30633063    }
    30643064  } else {
     
    31193119
    31203120  if (LinesOnBoundary.empty()) {
    3121     eLog() << Verbose(1) << "There is no tesselation structure to compare the point with, please create one first." << endl;
     3121    DoeLog(1) && (eLog()<< Verbose(1) << "There is no tesselation structure to compare the point with, please create one first." << endl);
    31223122    return NULL;
    31233123  }
     
    31463146          }
    31473147        } else {
    3148           eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl;
     3148          DoeLog(1) && (eLog()<< Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl);
    31493149        }
    31503150      }
     
    31523152  // check whether we found some points
    31533153  if (points->empty()) {
    3154     eLog() << Verbose(1) << "There is no nearest point: too far away from the surface." << endl;
     3154    DoeLog(1) && (eLog()<< Verbose(1) << "There is no nearest point: too far away from the surface." << endl);
    31553155    delete(points);
    31563156    return NULL;
     
    31713171  DistanceToPointMap * points = FindClosestBoundaryPointsToVector(x,LC);
    31723172  if (points == NULL) {
    3173     eLog() << Verbose(1) << "There is no nearest point: too far away from the surface." << endl;
     3173    DoeLog(1) && (eLog()<< Verbose(1) << "There is no nearest point: too far away from the surface." << endl);
    31743174    return NULL;
    31753175  }
     
    32373237        DistanceToPointMap * points = FindClosestBoundaryPointsToVector(x,LC);
    32383238  if (points == NULL) {
    3239     eLog() << Verbose(1) << "There is no nearest point: too far away from the surface." << endl;
     3239    DoeLog(1) && (eLog()<< Verbose(1) << "There is no nearest point: too far away from the surface." << endl);
    32403240    return NULL;
    32413241  }
     
    32863286        const double distance = BaseLineIntersection.NormSquared();
    32873287        if (Center.NormSquared() > BaseLine.NormSquared()) {
    3288           eLog() << Verbose(0) << "Algorithmic error: In second case we have intersection outside of baseline!" << endl;
     3288          DoeLog(0) && (eLog()<< Verbose(0) << "Algorithmic error: In second case we have intersection outside of baseline!" << endl);
    32893289        }
    32903290        if ((ClosestLines.empty()) || (distance < MinDistance)) {
     
    34853485    ReferencePoint = PointRunner->second;
    34863486  } else {
    3487     eLog() << Verbose(2) << "GetAllConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << "." << endl;
     3487    DoeLog(2) && (eLog()<< Verbose(2) << "GetAllConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << "." << endl);
    34883488    ReferencePoint = NULL;
    34893489  }
     
    35173517
    35183518  if (connectedPoints->empty()) { // if have not found any points
    3519     eLog() << Verbose(1) << "We have not found any connected points to " << *Point<< "." << endl;
     3519    DoeLog(1) && (eLog()<< Verbose(1) << "We have not found any connected points to " << *Point<< "." << endl);
    35203520    return NULL;
    35213521  }
     
    35503550
    35513551  if (SetOfNeighbours == NULL) {
    3552     eLog() << Verbose(2) << "Could not find any connected points!" << endl;
     3552    DoeLog(2) && (eLog()<< Verbose(2) << "Could not find any connected points!" << endl);
    35533553    delete(connectedCircle);
    35543554    return NULL;
     
    35613561      PlaneNormal.AddVector(&(*Runner)->NormalVector);
    35623562  } else {
    3563     eLog() << Verbose(0) << "Could not find any triangles for point " << *Point << "." << endl;
     3563    DoeLog(0) && (eLog()<< Verbose(0) << "Could not find any triangles for point " << *Point << "." << endl);
    35643564    performCriticalExit();
    35653565  }
     
    35803580    AngleZero.ProjectOntoPlane(&PlaneNormal);
    35813581    if (AngleZero.NormSquared() < MYEPSILON) {
    3582       eLog() << Verbose(0) << "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!" << endl;
     3582      DoeLog(0) && (eLog()<< Verbose(0) << "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!" << endl);
    35833583      performCriticalExit();
    35843584    }
     
    36313631
    36323632  if (SetOfNeighbours == NULL) {
    3633     eLog() << Verbose(2) << "Could not find any connected points!" << endl;
     3633    DoeLog(2) && (eLog()<< Verbose(2) << "Could not find any connected points!" << endl);
    36343634    delete(connectedCircle);
    36353635    return NULL;
     
    36853685    AngleZero.ProjectOntoPlane(&PlaneNormal);
    36863686    if (AngleZero.NormSquared() < MYEPSILON) {
    3687       eLog() << Verbose(0) << "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!" << endl;
     3687      DoeLog(0) && (eLog()<< Verbose(0) << "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!" << endl);
    36883688      performCriticalExit();
    36893689    }
     
    37083708    InserterTest = anglesOfPoints.insert(pair<double, TesselPoint*>(angle, (*listRunner)));
    37093709    if (!InserterTest.second) {
    3710       eLog() << Verbose(0) << "GetCircleOfSetOfPoints() got two atoms with same angle: " << *((InserterTest.first)->second) << " and " << (*listRunner) << endl;
     3710      DoeLog(0) && (eLog()<< Verbose(0) << "GetCircleOfSetOfPoints() got two atoms with same angle: " << *((InserterTest.first)->second) << " and " << (*listRunner) << endl);
    37113711      performCriticalExit();
    37123712    }
     
    37483748    ReferencePoint = PointRunner->second;
    37493749  } else {
    3750     eLog() << Verbose(1) << "GetPathOfConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << "." << endl;
     3750    DoeLog(1) && (eLog()<< Verbose(1) << "GetPathOfConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << "." << endl);
    37513751    return NULL;
    37523752  }
     
    37653765      LineRunner = TouchedLine.find(runner->second);
    37663766      if (LineRunner == TouchedLine.end()) {
    3767         eLog() << Verbose(1) << "I could not find " << *runner->second << " in the touched list." << endl;
     3767        DoeLog(1) && (eLog()<< Verbose(1) << "I could not find " << *runner->second << " in the touched list." << endl);
    37683768      } else if (!LineRunner->second) {
    37693769        LineRunner->second = true;
     
    37953795                }
    37963796              } else {
    3797                 eLog() << Verbose(1) << "I could not find " << *triangle << " in the touched list." << endl;
     3797                DoeLog(1) && (eLog()<< Verbose(1) << "I could not find " << *triangle << " in the touched list." << endl);
    37983798                triangle = NULL;
    37993799              }
     
    38123812          LineRunner = TouchedLine.find(CurrentLine);
    38133813          if (LineRunner == TouchedLine.end())
    3814             eLog() << Verbose(1) << "I could not find " << *CurrentLine << " in the touched list." << endl;
     3814            DoeLog(1) && (eLog()<< Verbose(1) << "I could not find " << *CurrentLine << " in the touched list." << endl);
    38153815          else
    38163816            LineRunner->second = true;
     
    38303830    }
    38313831  } else {
    3832     eLog() << Verbose(1) << "There are no lines attached to " << *ReferencePoint << "." << endl;
     3832    DoeLog(1) && (eLog()<< Verbose(1) << "There are no lines attached to " << *ReferencePoint << "." << endl);
    38333833  }
    38343834
     
    39103910
    39113911  if (Point == NULL) {
    3912     eLog() << Verbose(1) << "Point given is NULL." << endl;
     3912    DoeLog(1) && (eLog()<< Verbose(1) << "Point given is NULL." << endl);
    39133913  } else {
    39143914    // go through its lines and insert all triangles
     
    39423942
    39433943  if (point == NULL) {
    3944     eLog() << Verbose(1) << "Cannot remove the point " << point << ", it's NULL!" << endl;
     3944    DoeLog(1) && (eLog()<< Verbose(1) << "Cannot remove the point " << point << ", it's NULL!" << endl);
    39453945    return 0.;
    39463946  } else
     
    39523952  // get list of connected points
    39533953  if (point->lines.empty()) {
    3954     eLog() << Verbose(1) << "Cannot remove the point " << *point << ", it's connected to no lines!" << endl;
     3954    DoeLog(1) && (eLog()<< Verbose(1) << "Cannot remove the point " << *point << ", it's connected to no lines!" << endl);
    39553955    return 0.;
    39563956  }
     
    40334033        MiddleNode = EndNode;
    40344034        if (MiddleNode == connectedPath->end()) {
    4035           eLog() << Verbose(0) << "CRITICAL: Could not find a smallest angle!" << endl;
     4035          DoeLog(0) && (eLog()<< Verbose(0) << "CRITICAL: Could not find a smallest angle!" << endl);
    40364036          performCriticalExit();
    40374037        }
     
    40524052        triangle = GetPresentTriangle(TriangleCandidates);
    40534053        if (triangle != NULL) {
    4054           eLog() << Verbose(0) << "New triangle already present, skipping!" << endl;
     4054          DoeLog(0) && (eLog()<< Verbose(0) << "New triangle already present, skipping!" << endl);
    40554055          StartNode++;
    40564056          MiddleNode++;
     
    40904090          break;
    40914091        } else if (connectedPath->size() < 2) { // something's gone wrong!
    4092           eLog() << Verbose(0) << "CRITICAL: There are only two endpoints left!" << endl;
     4092          DoeLog(0) && (eLog()<< Verbose(0) << "CRITICAL: There are only two endpoints left!" << endl);
    40934093          performCriticalExit();
    40944094        } else {
     
    42434243    }
    42444244    default:
    4245       eLog() << Verbose(0) << "Number of wildcards is greater than 3, cannot happen!" << endl;
     4245      DoeLog(0) && (eLog()<< Verbose(0) << "Number of wildcards is greater than 3, cannot happen!" << endl);
    42464246      performCriticalExit();
    42474247      break;
     
    42964296  // sanity check
    42974297  if (LinesOnBoundary.empty()) {
    4298     eLog() << Verbose(2) << "FindAllDegeneratedTriangles() was called without any tesselation structure.";
     4298    DoeLog(2) && (eLog()<< Verbose(2) << "FindAllDegeneratedTriangles() was called without any tesselation structure.");
    42994299    return DegeneratedLines;
    43004300  }
     
    43204320      Log() << Verbose(0) << *Line1->second << " => " << *Line2->second << endl;
    43214321    else
    4322       eLog() << Verbose(1) << "Either " << (*it).first << " or " << (*it).second << " are not in LinesOnBoundary!" << endl;
     4322      DoeLog(1) && (eLog()<< Verbose(1) << "Either " << (*it).first << " or " << (*it).second << " are not in LinesOnBoundary!" << endl);
    43234323  }
    43244324
     
    44804480    NearestBoundaryPoint = PointRunner->second;
    44814481  } else {
    4482     eLog() << Verbose(1) << "I cannot find the boundary point." << endl;
     4482    DoeLog(1) && (eLog()<< Verbose(1) << "I cannot find the boundary point." << endl);
    44834483    return;
    44844484  }
     
    45484548    if ((BTS->lines[i]->ContainsBoundaryPoint(BestLine->endpoints[0])) && (BTS->lines[i]->ContainsBoundaryPoint(BestLine->endpoints[1]))) {
    45494549      if (BestLine == BTS->lines[i]){
    4550         eLog() << Verbose(0) << "BestLine is same as found line, something's wrong here!" << endl;
     4550        DoeLog(0) && (eLog()<< Verbose(0) << "BestLine is same as found line, something's wrong here!" << endl);
    45514551        performCriticalExit();
    45524552      }
     
    47404740    // connections to either polygon ...
    47414741    if (T->size() % 2 != 0) {
    4742       eLog() << Verbose(0) << " degenerated polygon contains an odd number of triangles, probably contains bridging non-degenerated ones, too!" << endl;
     4742      DoeLog(0) && (eLog()<< Verbose(0) << " degenerated polygon contains an odd number of triangles, probably contains bridging non-degenerated ones, too!" << endl);
    47434743      performCriticalExit();
    47444744    }
     
    47754775      AddTesselationLine(TPS[1], TPS[2], 2);
    47764776      if (TriangleNrs.empty())
    4777         eLog() << Verbose(0) << "No more free triangle numbers!" << endl;
     4777        DoeLog(0) && (eLog()<< Verbose(0) << "No more free triangle numbers!" << endl);
    47784778      BTS = new BoundaryTriangleSet(BLS, TriangleNrs.top()); // copy triangle ...
    47794779      AddTesselationTriangle(); // ... and add
     
    47844784    }
    47854785    if (!TriangleNrs.empty()) {
    4786       eLog() << Verbose(0) << "There have been less triangles created than removed!" << endl;
     4786      DoeLog(0) && (eLog()<< Verbose(0) << "There have been less triangles created than removed!" << endl);
    47874787    }
    47884788    delete(T);  // remove the triangleset
Note: See TracChangeset for help on using the changeset viewer.