Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tesselation/BoundaryTriangleSet.cpp

    r94d5ac6 rb8d215  
    9494  // set endpoints
    9595  int Counter = 0;
    96   LOG(4, "DEBUG: New triangle " << Nr << " with end points: ");
     96  LOG(4, "DEBUG: New triangle " << Nr << " with end points ... and lines:");
    9797  for (PointMap::iterator runner = OrderMap.begin(); runner != OrderMap.end(); runner++) {
    9898    endpoints[Counter] = runner->second;
    99     LOG(4, "DEBUG:    " << *endpoints[Counter]);
     99    LOG(4, "DEBUG:    " << *endpoints[Counter] << "\t\t" << *lines[Counter]);
    100100    Counter++;
    101101  }
     
    246246
    247247  // 1. get intersection with plane
    248   LOG(3, "DEBUG: Looking for closest point of triangle " << *this << " to " << x << ".");
    249   LOG(3, "DEBUG: endpoints are " << endpoints[0]->node->getPosition() << ","
     248  LOG(4, "DEBUG: Looking for closest point of triangle " << *this << " to " << x << ".");
     249  LOG(5, "DEBUG: endpoints are " << endpoints[0]->node->getPosition() << ","
    250250      << endpoints[1]->node->getPosition() << ", and " << endpoints[2]->node->getPosition() << ".");
    251251  try {
     
    256256  }
    257257  Vector InPlane(ClosestPoint); // points from plane intersection to straight-down point
    258   LOG(4, "DEBUG: Closest point on triangle plane is " << ClosestPoint << ".");
     258  LOG(5, "DEBUG: Closest point on triangle plane is " << ClosestPoint << ".");
    259259
    260260  // 2. Calculate in plane part of line (x, intersection)
     
    269269    CrossPoint[i] = l.getClosestPoint(InPlane);
    270270    // NOTE: direction of line is normalized, hence s must not necessarily be in [0,1] for the baseline
    271     LOG(4, "DEBUG: Closest point on line from " << (endpoints[(i+1)%3]->node->getPosition())
     271    LOG(5, "DEBUG: Closest point on line from " << (endpoints[(i+1)%3]->node->getPosition())
    272272        << " to " << (endpoints[i%3]->node->getPosition()) << " is " << CrossPoint[i] << ".");
    273273    CrossPoint[i] -= (endpoints[(i+1)%3]->node->getPosition());  // cross point was returned as absolute vector
    274274    const double s = CrossPoint[i].ScalarProduct(Direction)/Direction.NormSquared();
    275     LOG(5, "DEBUG: Factor s is " << s << ".");
     275    LOG(6, "DEBUG: Factor s is " << s << ".");
    276276    if ((s >= -MYEPSILON) && ((s-1.) <= MYEPSILON)) {
    277277      CrossPoint[i] += (endpoints[(i+1)%3]->node->getPosition());  // make cross point absolute again
    278       LOG(5, "DEBUG: Crosspoint is " << CrossPoint[i] << ", intersecting BoundaryLine between "
     278      LOG(6, "DEBUG: Crosspoint is " << CrossPoint[i] << ", intersecting BoundaryLine between "
    279279          << endpoints[i % 3]->node->getPosition() << " and "
    280280          << endpoints[(i + 1) % 3]->node->getPosition() << ".");
     
    285285      else
    286286        CrossPoint[i] = (endpoints[i%3]->node->getPosition());
    287       LOG(5, "DEBUG: Crosspoint is " << CrossPoint[i] << ", intersecting outside of BoundaryLine between "
     287      LOG(6, "DEBUG: Crosspoint is " << CrossPoint[i] << ", intersecting outside of BoundaryLine between "
    288288          << endpoints[i % 3]->node->getPosition() << " and "
    289289          << endpoints[(i + 1) % 3]->node->getPosition() << ".");
     
    312312    ShortestDistance = InPlane.DistanceSquared(x);
    313313  }
    314   LOG(3, "DEBUG: Closest Point is " << ClosestPoint << " with shortest squared distance is " << ShortestDistance << ".");
     314  LOG(4, "DEBUG: Closest Point is " << ClosestPoint << " with shortest squared distance is " << ShortestDistance << ".");
    315315
    316316  return ShortestDistance;
     
    367367{
    368368  //Info FunctionInfo(__func__);
    369   LOG(1, "INFO: Checking " << Points[0] << "," << Points[1] << "," << Points[2] << " against " << endpoints[0] << "," << endpoints[1] << "," << endpoints[2] << ".");
    370   return (((endpoints[0] == Points[0]) || (endpoints[0] == Points[1]) || (endpoints[0] == Points[2])) && ((endpoints[1] == Points[0]) || (endpoints[1] == Points[1]) || (endpoints[1] == Points[2])) && ((endpoints[2] == Points[0]) || (endpoints[2] == Points[1]) || (endpoints[2] == Points[2])
     369  LOG(5, "DEBUG: Checking " << *Points[0] << "," << *Points[1] << "," << *Points[2]
     370      << " against " << *this); //*endpoints[0] << "," << *endpoints[1] << "," << *endpoints[2] << ".");
     371  return (((endpoints[0] == Points[0]) || (endpoints[0] == Points[1]) || (endpoints[0] == Points[2]))
     372      && ((endpoints[1] == Points[0]) || (endpoints[1] == Points[1]) || (endpoints[1] == Points[2]))
     373      && ((endpoints[2] == Points[0]) || (endpoints[2] == Points[1]) || (endpoints[2] == Points[2])
    371374
    372375  ));
Note: See TracChangeset for help on using the changeset viewer.