Ignore:
Timestamp:
12/04/06 22:34:15 (18 years ago)
Author:
mattausch
Message:

warning! changed pvs output because of paper hack

File:
1 edited

Legend:

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

    r1842 r1843  
    562562        disposeRays(postProcessSamples, outRays); 
    563563 
    564                  
    565         // write view cells to disc 
    566         if (mExportViewCells) 
    567         { 
    568                 char filename[100]; 
    569                 Environment::GetSingleton()->GetStringValue("ViewCells.filename", filename); 
    570                 ExportViewCells(filename, mExportPvs, mPreprocessor->mObjects); 
    571         } 
    572564 
    573565        //////////////// 
     
    610602        // recalculate view cells 
    611603        EvaluateViewCellsStats(); 
     604 
     605        if (1) CompressViewCells(); 
     606 
     607        // write view cells to disc 
     608        if (mExportViewCells) 
     609        { 
     610                char filename[100]; 
     611                Environment::GetSingleton()->GetStringValue("ViewCells.filename", filename); 
     612                ExportViewCells(filename, mExportPvs, mPreprocessor->mObjects); 
     613        } 
    612614 
    613615        return numSamples; 
     
    16261628{ 
    16271629        return viewCell->GetVolume(); 
     1630} 
     1631 
     1632 
     1633void ViewCellsManager::CompressViewCells() 
     1634{ 
     1635        //////////// 
     1636        //-- compression 
     1637 
     1638        if (ViewCellsTreeConstructed() && mCompressViewCells) 
     1639        { 
     1640                int pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 
     1641                 
     1642                cout << "number of entries before compress: " << pvsEntries << endl; 
     1643                Debug << "number of entries before compress: " << pvsEntries << endl; 
     1644 
     1645                mViewCellsTree->SetViewCellsStorage(ViewCellsTree::COMPRESSED); 
     1646 
     1647                pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 
     1648                 
     1649                Debug << "number of entries after compress: " << pvsEntries << endl; 
     1650                cout << "number of entries after compress: " << pvsEntries << endl; 
     1651        } 
    16281652} 
    16291653 
     
    45824606         
    45834607 
    4584         //////////// 
    4585         //-- compression 
    4586  
    4587         if (ViewCellsTreeConstructed() && mCompressViewCells) 
    4588         { 
    4589                 int pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 
    4590                  
    4591                 cout << "number of entries before compress: " << pvsEntries << endl; 
    4592                 Debug << "number of entries before compress: " << pvsEntries << endl; 
    4593  
    4594                 mViewCellsTree->SetViewCellsStorage(ViewCellsTree::COMPRESSED); 
    4595  
    4596                 pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 
    4597                  
    4598                 Debug << "number of entries after compress: " << pvsEntries << endl; 
    4599                 cout << "number of entries after compress: " << pvsEntries << endl; 
    4600         } 
    4601  
     4608        if (0) CompressViewCells(); 
     4609         
    46024610        // collapse sibling leaves that share the same view cell 
    46034611        if (0) mVspBspTree->CollapseTree(); 
     
    55005508         
    55015509 
     5510        mHierarchyManager->CreateUniqueObjectIds(); 
     5511 
    55025512        /////////// 
    55035513        //-- compression 
    55045514 
    5505         if (ViewCellsTreeConstructed() && mCompressViewCells) 
    5506         { 
    5507                 int pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 
    5508                  
    5509                 cout << "number of entries before compress: " << pvsEntries << endl; 
    5510                 Debug << "number of entries before compress: " << pvsEntries << endl; 
    5511  
    5512                 mViewCellsTree->SetViewCellsStorage(ViewCellsTree::COMPRESSED); 
    5513  
    5514                 pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 
    5515                  
    5516                 Debug << "number of entries after compress: " << pvsEntries << endl; 
    5517                 cout << "number of entries after compress: " << pvsEntries << endl; 
    5518         } 
     5515        if (0) CompressViewCells(); 
    55195516 
    55205517        ///////////// 
     
    59245921        stream << "<VisibilitySolution>" << endl; 
    59255922 
    5926         if (exportPvs)  
     5923        // §§ tmp matt: for storage cost 
     5924        if (0 && exportPvs)  
    59275925        { 
    59285926        /////////////// 
     
    62276225                evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
    62286226                evalStrats.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 
    6229  
    6230                 Debug << "casting volume strategies" << endl; 
    6231                 cout << "casting volume strategies" << endl; 
    62326227        } 
    62336228        else 
     
    62386233                //evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
    62396234                //evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
    6240  
    6241                 Debug << "casting surface strategies" << endl; 
    6242                 cout << "casting surface strategies" << endl; 
    62436235        } 
    62446236         
     
    62476239                Debug << evalStrats[i] << " "; 
    62486240        Debug << endl; 
     6241 
     6242        cout << "casting eval strategies: "; 
     6243        for (int i = 0; i < (int)evalStrats.size(); ++ i) 
     6244                cout << evalStrats[i] << " "; 
     6245        cout << endl; 
    62496246 
    62506247        while (castSamples < numSamples) 
Note: See TracChangeset for help on using the changeset viewer.