Changeset 1763 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 11/16/06 19:41:44 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1761 r1763 1579 1579 mViewCellsTree->UpdateViewCellsStats(*it, mCurrentViewCellsStats); 1580 1580 } 1581 cout << "here44 " << mCurrentViewCellsStats.maxPvs << endl;1582 1581 } 1583 1582 … … 2214 2213 { 2215 2214 ViewCellContainer::const_iterator it, it_end = mViewCells.end(); 2216 cout << "here2" << endl; 2215 2217 2216 for (it = mViewCells.begin(); it != it_end; ++ it) 2218 { cout << "here4 " << mOnlyValidViewCells << " " << (*it)->GetValid() << endl;2217 { 2219 2218 if (!mOnlyValidViewCells || (*it)->GetValid()) 2220 { cout << "here5 " << mColorCode << endl;2219 { 2221 2220 ExportColor(exporter, *it, colorCode); 2222 2221 ExportViewCellGeometry(exporter, *it, sceneBox, clipPlane); … … 2789 2788 2790 2789 case 1: // pvs 2791 { //cout << "here22 " << mCurrentViewCellsStats.maxPvs << endl;2790 { 2792 2791 if (mCurrentViewCellsStats.maxPvs) 2793 2792 { 2794 //cout << "pvscost : " << (float)mViewCellsTree->GetPvsCost(vc) << endl; 2795 //cout << "maxPvs : " << (float)mCurrentViewCellsStats.maxPvs << endl; 2796 2797 importance = 2798 (float)mViewCellsTree->GetPvsCost(vc) / 2799 (float)mCurrentViewCellsStats.maxPvs; 2793 importance = (float)mViewCellsTree->GetPvsCost(vc) / 2794 (float)mCurrentViewCellsStats.maxPvs; 2800 2795 } 2801 2796 } … … 2817 2812 #endif 2818 2813 default: 2819 cout << "here10" << endl;2820 2814 break; 2821 2815 } … … 3057 3051 const int savedColorCode = mColorCode; 3058 3052 3053 Exporter *exporter; 3054 3055 #if 0 3059 3056 // export merged view cells 3060 3057 mColorCode = 0; // use random colors 3061 3058 3062 Exporter *exporter = Exporter::GetExporter("merged_view_cells.wrl");3059 exporter = Exporter::GetExporter("merged_view_cells.wrl"); 3063 3060 3064 3061 cout << "exporting view cells after merge ... "; … … 3077 3074 } 3078 3075 cout << "finished" << endl; 3076 #endif 3079 3077 3080 3078 // export merged view cells using pvs color coding 3081 3082 3079 exporter = Exporter::GetExporter("merged_view_cells_pvs.wrl"); 3083 3080 cout << "exporting view cells after merge (pvs size) ... "; … … 3092 3089 exporter->SetFilled(); 3093 3090 mColorCode = 1; 3094 cout << "here49 " << mColorCode << endl; 3091 3095 3092 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 3096 3093 … … 3183 3180 3184 3181 // visualization of the view cells 3185 if ( 0) ExportMergedViewCells(objects);3182 if (1) ExportMergedViewCells(objects); 3186 3183 3187 3184 // compute final meshes and volume / area … … 5504 5501 Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 5505 5502 5503 Vector3 scale(1.0f, 0.9f, 1.0f); 5506 5504 if (exporter) 5507 5505 { 5506 EvaluateViewCellsStats(); 5507 5508 5508 // hack color code (show pvs size) 5509 5509 const int savedColorCode = mColorCode; 5510 mColorCode = 0;5510 mColorCode = 1; // export pvs 5511 5511 5512 5512 const long starttime = GetTime(); … … 5515 5515 // matt: hack for clamping scene 5516 5516 AxisAlignedBox3 bbox = mViewSpaceBox; 5517 bbox.Scale( Vector3(0.5, 1, 0.5));5517 bbox.Scale(scale); 5518 5518 5519 5519 if (CLAMP_TO_BOX) … … 5536 5536 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects, 5537 5537 CLAMP_TO_BOX ? &bbox : NULL, false); 5538 ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 5538 5539 //ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 5540 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 5539 5541 5540 5542 delete exporter; … … 5553 5555 // matt: hack for making visualization smaller in size 5554 5556 AxisAlignedBox3 bbox = mHierarchyManager->GetObjectSpaceBox(); 5555 bbox.Scale( Vector3(0.5, 1, 0.5));5557 bbox.Scale(scale); 5556 5558 5557 5559 cout << "exporting object space hierarchy ... "; … … 5562 5564 } 5563 5565 5564 cout << "here92 " << mHierarchyManager->GetVspTree()->GetStatistics().maxPvs << endl;5565 5566 5566 // visualization of the view cells 5567 if ( 1)5567 if (0) 5568 5568 { 5569 EvaluateViewCellsStats();5570 5569 ExportMergedViewCells(objects); 5571 5570 }
Note: See TracChangeset
for help on using the changeset viewer.