Changes in src/tesselationhelpers.cpp [6a7f78c:e138de]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselationhelpers.cpp
r6a7f78c re138de 77 77 78 78 if (fabs(m11) < MYEPSILON) 79 eLog() << Verbose( 1) << "three points are colinear." << endl;79 eLog() << Verbose(0) << "ERROR: 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( 1) << "The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl;86 eLog() << Verbose(0) << "ERROR: 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(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 } 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; 192 191 193 192 Center->Zero(); … … 225 224 // test whether new center is on the parameter circle's plane 226 225 if (fabs(helper.ScalarProduct(&CirclePlaneNormal)) > HULLEPSILON) { 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;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; 228 227 helper.ProjectOntoPlane(&CirclePlaneNormal); 229 228 } … … 231 230 // test whether the new center vector has length of CircleRadius 232 231 if (fabs(radius - CircleRadius) > HULLEPSILON) 233 eLog() << Verbose(1) << " The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;232 eLog() << Verbose(1) << "ERROR: The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl; 234 233 alpha = helper.Angle(&OldSphereCenter); 235 234 // make the angle unique by checking the halfplanes/search direction … … 462 461 for (int i=0;i<3;i++) 463 462 for (int j=i+1; j<3; j++) { 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 463 if (nodes[i]->lines.find(nodes[j]->node->nr) != nodes[i]->lines.end()) { // there already is a line 468 464 LineMap::const_iterator FindLine; 469 465 pair<LineMap::const_iterator,LineMap::const_iterator> FindPair; … … 495 491 Vector BaseLineVector, OrthogonalVector, helper; 496 492 if (candidate1->BaseLine != candidate2->BaseLine) { // sanity check 497 eLog() << Verbose(1) << "sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;493 Log() << Verbose(0) << "ERROR: sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl; 498 494 //return false; 499 495 exit(1); … … 578 574 } 579 575 } else { 580 eLog() << Verbose( 1) << "The current cell " << LC->n[0] << "," << LC->n[1] << ","576 eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << "," 581 577 << LC->n[2] << " is invalid!" << endl; 582 578 } … … 634 630 } 635 631 } else { 636 eLog() << Verbose( 1) << "The current cell " << LC->n[0] << "," << LC->n[1] << ","632 eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << "," 637 633 << LC->n[2] << " is invalid!" << endl; 638 634 } … … 742 738 } 743 739 } else { 744 eLog() << Verbose( 1) << "Given vrmlfile is " << vrmlfile << "." << endl;740 eLog() << Verbose(0) << "ERROR: Given vrmlfile is " << vrmlfile << "." << endl; 745 741 } 746 742 delete(center); … … 756 752 { 757 753 Vector helper; 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 } 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); 775 768 }; 776 769 … … 815 808 *rasterfile << "9\n# terminating special property\n"; 816 809 } else { 817 eLog() << Verbose( 1) << "Given rasterfile is " << rasterfile << "." << endl;810 eLog() << Verbose(0) << "ERROR: Given rasterfile is " << rasterfile << "." << endl; 818 811 } 819 812 IncludeSphereinRaster3D(rasterfile, Tess, cloud); … … 832 825 *tecplot << "TITLE = \"3D CONVEX SHELL\"" << endl; 833 826 *tecplot << "VARIABLES = \"X\" \"Y\" \"Z\" \"U\"" << endl; 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 } 827 *tecplot << "ZONE T=\"" << N << "-"; 828 for (int i=0;i<3;i++) 829 *tecplot << (i==0 ? "" : "_") << TesselStruct->LastTriangle->endpoints[i]->node->Name; 842 830 *tecplot << "\", N=" << TesselStruct->PointsOnBoundary.size() << ", E=" << TesselStruct->TrianglesOnBoundary.size() << ", DATAPACKING=POINT, ZONETYPE=FETRIANGLE" << endl; 843 831 int i=0;
Note:
See TracChangeset
for help on using the changeset viewer.