- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tesselation/BoundaryTriangleSet.cpp
r94d5ac6 rb8d215 94 94 // set endpoints 95 95 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:"); 97 97 for (PointMap::iterator runner = OrderMap.begin(); runner != OrderMap.end(); runner++) { 98 98 endpoints[Counter] = runner->second; 99 LOG(4, "DEBUG: " << *endpoints[Counter] );99 LOG(4, "DEBUG: " << *endpoints[Counter] << "\t\t" << *lines[Counter]); 100 100 Counter++; 101 101 } … … 246 246 247 247 // 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() << "," 250 250 << endpoints[1]->node->getPosition() << ", and " << endpoints[2]->node->getPosition() << "."); 251 251 try { … … 256 256 } 257 257 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 << "."); 259 259 260 260 // 2. Calculate in plane part of line (x, intersection) … … 269 269 CrossPoint[i] = l.getClosestPoint(InPlane); 270 270 // 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()) 272 272 << " to " << (endpoints[i%3]->node->getPosition()) << " is " << CrossPoint[i] << "."); 273 273 CrossPoint[i] -= (endpoints[(i+1)%3]->node->getPosition()); // cross point was returned as absolute vector 274 274 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 << "."); 276 276 if ((s >= -MYEPSILON) && ((s-1.) <= MYEPSILON)) { 277 277 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 " 279 279 << endpoints[i % 3]->node->getPosition() << " and " 280 280 << endpoints[(i + 1) % 3]->node->getPosition() << "."); … … 285 285 else 286 286 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 " 288 288 << endpoints[i % 3]->node->getPosition() << " and " 289 289 << endpoints[(i + 1) % 3]->node->getPosition() << "."); … … 312 312 ShortestDistance = InPlane.DistanceSquared(x); 313 313 } 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 << "."); 315 315 316 316 return ShortestDistance; … … 367 367 { 368 368 //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]) 371 374 372 375 ));
Note:
See TracChangeset
for help on using the changeset viewer.