Changes in src/tesselationhelpers.cpp [e138de:6a7f78c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselationhelpers.cpp
re138de r6a7f78c 77 77 78 78 if (fabs(m11) < MYEPSILON) 79 eLog() << Verbose( 0) << "ERROR:three points are colinear." << endl;79 eLog() << Verbose(1) << "three points are colinear." << endl; 80 80 81 81 center->x[0] = 0.5 * m12/ m11; … … 84 84 85 85 if (fabs(a.Distance(center) - RADIUS) > MYEPSILON) 86 eLog() << Verbose( 0) << "ERROR:The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl;86 eLog() << Verbose(1) << "The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl; 87 87 88 88 gsl_matrix_free(A); … … 187 187 gamma = M_PI - SideA.Angle(&SideB); 188 188 //Log() << Verbose(3) << "INFO: alpha = " << alpha/M_PI*180. << ", beta = " << beta/M_PI*180. << ", gamma = " << gamma/M_PI*180. << "." << endl; 189 if (fabs(M_PI - alpha - beta - gamma) > HULLEPSILON) 190 eLog() << Verbose(0) << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl; 189 if (fabs(M_PI - alpha - beta - gamma) > HULLEPSILON) { 190 eLog() << Verbose(1) << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl; 191 } 191 192 192 193 Center->Zero(); … … 224 225 // test whether new center is on the parameter circle's plane 225 226 if (fabs(helper.ScalarProduct(&CirclePlaneNormal)) > HULLEPSILON) { 226 eLog() << Verbose( 0) << "ERROR:Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(&CirclePlaneNormal)) << "!" << endl;227 eLog() << Verbose(1) << "Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(&CirclePlaneNormal)) << "!" << endl; 227 228 helper.ProjectOntoPlane(&CirclePlaneNormal); 228 229 } … … 230 231 // test whether the new center vector has length of CircleRadius 231 232 if (fabs(radius - CircleRadius) > HULLEPSILON) 232 eLog() << Verbose(1) << " ERROR:The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;233 eLog() << Verbose(1) << "The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl; 233 234 alpha = helper.Angle(&OldSphereCenter); 234 235 // make the angle unique by checking the halfplanes/search direction … … 461 462 for (int i=0;i<3;i++) 462 463 for (int j=i+1; j<3; j++) { 463 if (nodes[i]->lines.find(nodes[j]->node->nr) != nodes[i]->lines.end()) { // there already is a line 464 if (nodes[i] == NULL) { 465 Log() << Verbose(1) << "Node nr. " << i << " is not yet present." << endl; 466 result = true; 467 } else if (nodes[i]->lines.find(nodes[j]->node->nr) != nodes[i]->lines.end()) { // there already is a line 464 468 LineMap::const_iterator FindLine; 465 469 pair<LineMap::const_iterator,LineMap::const_iterator> FindPair; … … 491 495 Vector BaseLineVector, OrthogonalVector, helper; 492 496 if (candidate1->BaseLine != candidate2->BaseLine) { // sanity check 493 Log() << Verbose(0) << "ERROR:sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;497 eLog() << Verbose(1) << "sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl; 494 498 //return false; 495 499 exit(1); … … 574 578 } 575 579 } else { 576 eLog() << Verbose( 0) << "ERROR:The current cell " << LC->n[0] << "," << LC->n[1] << ","580 eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," 577 581 << LC->n[2] << " is invalid!" << endl; 578 582 } … … 630 634 } 631 635 } else { 632 eLog() << Verbose( 0) << "ERROR:The current cell " << LC->n[0] << "," << LC->n[1] << ","636 eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," 633 637 << LC->n[2] << " is invalid!" << endl; 634 638 } … … 738 742 } 739 743 } else { 740 eLog() << Verbose( 0) << "ERROR:Given vrmlfile is " << vrmlfile << "." << endl;744 eLog() << Verbose(1) << "Given vrmlfile is " << vrmlfile << "." << endl; 741 745 } 742 746 delete(center); … … 752 756 { 753 757 Vector helper; 754 // include the current position of the virtual sphere in the temporary raster3d file 755 Vector *center = cloud->GetCenter(); 756 // make the circumsphere's center absolute again 757 helper.CopyVector(Tess->LastTriangle->endpoints[0]->node->node); 758 helper.AddVector(Tess->LastTriangle->endpoints[1]->node->node); 759 helper.AddVector(Tess->LastTriangle->endpoints[2]->node->node); 760 helper.Scale(1./3.); 761 helper.SubtractVector(center); 762 // and add to file plus translucency object 763 *rasterfile << "# current virtual sphere\n"; 764 *rasterfile << "8\n 25.0 0.6 -1.0 -1.0 -1.0 0.2 0 0 0 0\n"; 765 *rasterfile << "2\n " << helper.x[0] << " " << helper.x[1] << " " << helper.x[2] << "\t" << 5. << "\t1 0 0\n"; 766 *rasterfile << "9\n terminating special property\n"; 767 delete(center); 758 759 if (Tess->LastTriangle != NULL) { 760 // include the current position of the virtual sphere in the temporary raster3d file 761 Vector *center = cloud->GetCenter(); 762 // make the circumsphere's center absolute again 763 helper.CopyVector(Tess->LastTriangle->endpoints[0]->node->node); 764 helper.AddVector(Tess->LastTriangle->endpoints[1]->node->node); 765 helper.AddVector(Tess->LastTriangle->endpoints[2]->node->node); 766 helper.Scale(1./3.); 767 helper.SubtractVector(center); 768 // and add to file plus translucency object 769 *rasterfile << "# current virtual sphere\n"; 770 *rasterfile << "8\n 25.0 0.6 -1.0 -1.0 -1.0 0.2 0 0 0 0\n"; 771 *rasterfile << "2\n " << helper.x[0] << " " << helper.x[1] << " " << helper.x[2] << "\t" << 5. << "\t1 0 0\n"; 772 *rasterfile << "9\n terminating special property\n"; 773 delete(center); 774 } 768 775 }; 769 776 … … 808 815 *rasterfile << "9\n# terminating special property\n"; 809 816 } else { 810 eLog() << Verbose( 0) << "ERROR:Given rasterfile is " << rasterfile << "." << endl;817 eLog() << Verbose(1) << "Given rasterfile is " << rasterfile << "." << endl; 811 818 } 812 819 IncludeSphereinRaster3D(rasterfile, Tess, cloud); … … 825 832 *tecplot << "TITLE = \"3D CONVEX SHELL\"" << endl; 826 833 *tecplot << "VARIABLES = \"X\" \"Y\" \"Z\" \"U\"" << endl; 827 *tecplot << "ZONE T=\"" << N << "-"; 828 for (int i=0;i<3;i++) 829 *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name; 834 *tecplot << "ZONE T=\""; 835 if (N < 0) { 836 *tecplot << cloud->GetName(); 837 } else { 838 *tecplot << N << "-"; 839 for (int i=0;i<3;i++) 840 *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name; 841 } 830 842 *tecplot << "\", N=" << TesselStruct->PointsOnBoundary.size() << ", E=" << TesselStruct->TrianglesOnBoundary.size() << ", DATAPACKING=POINT, ZONETYPE=FETRIANGLE" << endl; 831 843 int i=0;
Note:
See TracChangeset
for help on using the changeset viewer.