Ignore:
Timestamp:
11/16/06 19:41:44 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1761 r1763  
    15791579                mViewCellsTree->UpdateViewCellsStats(*it, mCurrentViewCellsStats); 
    15801580        } 
    1581         cout << "here44 " << mCurrentViewCellsStats.maxPvs << endl; 
    15821581} 
    15831582 
     
    22142213{ 
    22152214        ViewCellContainer::const_iterator it, it_end = mViewCells.end(); 
    2216 cout << "here2" << endl; 
     2215 
    22172216        for (it = mViewCells.begin(); it != it_end; ++ it) 
    2218         {cout << "here4 " << mOnlyValidViewCells << " " << (*it)->GetValid() <<  endl; 
     2217        { 
    22192218                if (!mOnlyValidViewCells || (*it)->GetValid()) 
    2220                 {cout << "here5 " << mColorCode << endl; 
     2219                { 
    22212220                        ExportColor(exporter, *it, colorCode);   
    22222221                        ExportViewCellGeometry(exporter, *it, sceneBox, clipPlane); 
     
    27892788                 
    27902789        case 1: // pvs 
    2791                 { //cout << "here22 " << mCurrentViewCellsStats.maxPvs << endl; 
     2790                { 
    27922791                        if (mCurrentViewCellsStats.maxPvs) 
    27932792                        { 
    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; 
    28002795                        } 
    28012796                } 
     
    28172812#endif 
    28182813        default: 
    2819                 cout << "here10" << endl; 
    28202814                break; 
    28212815        } 
     
    30573051        const int savedColorCode = mColorCode; 
    30583052 
     3053        Exporter *exporter; 
     3054 
     3055#if 0 
    30593056        // export merged view cells 
    30603057        mColorCode = 0; // use random colors 
    30613058 
    3062         Exporter *exporter = Exporter::GetExporter("merged_view_cells.wrl"); 
     3059        exporter = Exporter::GetExporter("merged_view_cells.wrl"); 
    30633060 
    30643061        cout << "exporting view cells after merge ... "; 
     
    30773074        } 
    30783075        cout << "finished" << endl; 
     3076#endif 
    30793077 
    30803078        // export merged view cells using pvs color coding 
    3081          
    30823079        exporter = Exporter::GetExporter("merged_view_cells_pvs.wrl"); 
    30833080        cout << "exporting view cells after merge (pvs size) ... ";      
     
    30923089                exporter->SetFilled(); 
    30933090                mColorCode = 1; 
    3094 cout << "here49 " << mColorCode << endl; 
     3091 
    30953092                ExportViewCellsForViz(exporter, NULL,  mColorCode, GetClipPlane()); 
    30963093 
     
    31833180 
    31843181        //  visualization of the view cells 
    3185         if (0) ExportMergedViewCells(objects); 
     3182        if (1) ExportMergedViewCells(objects); 
    31863183 
    31873184        // compute final meshes and volume / area 
     
    55045501        Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 
    55055502 
     5503        Vector3 scale(1.0f, 0.9f, 1.0f); 
    55065504        if (exporter) 
    55075505        { 
     5506                EvaluateViewCellsStats(); 
     5507 
    55085508                // hack color code (show pvs size) 
    55095509                const int savedColorCode = mColorCode; 
    5510                 mColorCode = 0; 
     5510                mColorCode = 1; // export pvs 
    55115511 
    55125512                const long starttime = GetTime(); 
     
    55155515                // matt: hack for clamping scene 
    55165516                AxisAlignedBox3 bbox = mViewSpaceBox; 
    5517                 bbox.Scale(Vector3(0.5, 1, 0.5)); 
     5517                bbox.Scale(scale); 
    55185518 
    55195519                if (CLAMP_TO_BOX) 
     
    55365536                mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects,  
    55375537                                                                                                          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()); 
    55395541 
    55405542                delete exporter; 
     
    55535555                // matt: hack for making visualization smaller in size 
    55545556                AxisAlignedBox3 bbox = mHierarchyManager->GetObjectSpaceBox(); 
    5555                 bbox.Scale(Vector3(0.5, 1, 0.5)); 
     5557                bbox.Scale(scale); 
    55565558 
    55575559                cout << "exporting object space hierarchy ... "; 
     
    55625564        } 
    55635565         
    5564         cout << "here92 " << mHierarchyManager->GetVspTree()->GetStatistics().maxPvs << endl; 
    5565  
    55665566        // visualization of the view cells 
    5567     if (1)  
     5567    if (0)  
    55685568        {        
    5569                 EvaluateViewCellsStats(); 
    55705569                ExportMergedViewCells(objects); 
    55715570        } 
Note: See TracChangeset for help on using the changeset viewer.