Changeset 1749


Ignore:
Timestamp:
11/14/06 15:33:59 (18 years ago)
Author:
mattausch
Message:

removed bug from exportviewcells

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
7 edited

Legend:

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

    r1744 r1749  
    296296        mMemoryConst = (float)sizeof(ObjectContainer); 
    297297 
    298         /*cout << "bvh memcost: " << mMemoryConst << endl; 
    299         cout << "triangle: " << sizeof(TriangleIntersectable) << endl; 
    300         cout << "triangle: " << sizeof(Intersectable) << endl; 
    301         cout << "triangle: " << sizeof(ObjectContainer) << endl; 
    302         cout << "triangle: " << sizeof(float) << endl; 
    303         cout << "triangle: " << sizeof(int) << endl; 
    304 */ 
    305298    mUseBboxAreaForSah = true; 
    306299 
     
    328321        Debug << "minimal rays for visibility: " << mMinRaysForVisibility << endl; 
    329322        Debug << "bvh mem const: " << mMemoryConst << endl; 
    330 cout << "here10 " << mRenderCostDecreaseWeight << endl; 
     323 
    331324        Debug << endl; 
    332325} 
     
    611604        } 
    612605 
    613         //splitCandidate.SetOldCost(oldRenderCost); 
     606        // hack: don't allow empty splits to be taken 
     607        if (splitCandidate.mFrontObjects.empty() || splitCandidate.mBackObjects.empty()) 
     608                priority = 0; 
    614609        // compute global decrease in render cost 
    615610        splitCandidate.SetPriority(priority); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1745 r1749  
    18971897                if (useFilter) 
    18981898                { 
     1899                        ViewCellLeaf dummy; 
     1900                        dummy.SetPvs(pvs); 
    18991901                        ObjectPvs filteredPvs; 
    1900                         mVspTree->mViewCellsManager->ApplyFilter2(vc, false, 1.0f, filteredPvs); 
     1902                        mVspTree->mViewCellsManager->ApplyFilter2(&dummy, false, 1.0f, filteredPvs); 
    19011903                        ComputePvs(filteredPvs, rc, pvsEntries); 
    19021904                } 
     
    19041906                { 
    19051907                        ComputePvs(pvs, rc, pvsEntries); 
    1906                 }                
     1908                } 
    19071909 
    19081910                rc *= vc->GetVolume(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1743 r1749  
    153153     
    154154        mVisibilityFileName = buffer; 
    155         Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilityFilter", mApplyVisibilityFilter ); 
     155        Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilityFilter", mApplyVisibilityFilter); 
    156156        Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilitySpatialFilter", 
    157157                                                                                          mApplyVisibilitySpatialFilter ); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp

    r1743 r1749  
    121121 
    122122          if (vssRays.size()!=32) { 
    123                 cerr<<"wrong number of rays "<<vssRays.size()<<endl; 
     123                cerr<<"wrong number of rays "<<(int)vssRays.size()<<endl; 
    124124                exit(1); 
    125125          } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp

    r1745 r1749  
    23672367        while (it.HasMoreEntries()) 
    23682368        { 
    2369                 ObjectPvsEntry entry; 
     2369                ObjectPvsEntry entry = it.Next(); 
    23702370                Intersectable *obj = entry.mObject; 
    23712371 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1745 r1749  
    580580        disposeRays(postProcessSamples, outRays); 
    581581 
    582          
     582                 
     583        // write view cells to disc 
     584        if (mExportViewCells) 
     585        { 
     586                char filename[100]; 
     587                Environment::GetSingleton()->GetStringValue("ViewCells.filename", filename); 
     588                ExportViewCells(filename, mExportPvs, mPreprocessor->mObjects); 
     589        } 
     590 
    583591        //////////////// 
    584592        //-- Evaluation of the resulting view cell partition.  
     
    589597                EvalViewCellPartition(); 
    590598        } 
    591                  
    592         // write view cells to disc 
    593         if (1 && mExportViewCells) 
    594         { 
    595                 char filename[100]; 
    596                 Environment::GetSingleton()->GetStringValue("ViewCells.filename", filename); 
    597                 ExportViewCells(filename, mExportPvs, mPreprocessor->mObjects); 
    598         } 
    599  
     599         
    600600        ///////////////// 
    601601        //-- Finally, we do some visualization 
     
    60636063                        Debug << "statistics computed in " << timeDiff * 1e-3 << " secs" << endl; 
    60646064 
    6065 #if 0 
     6065#if 1 
    60666066                        //////////////////////////// 
    60676067                        // filtered stats 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r1744 r1749  
    504504 
    505505        Debug << "vsp mem const: " << mMemoryConst << endl; 
    506 cout << "here11 " << mRenderCostDecreaseWeight << endl; 
     506 
    507507        Debug << endl; 
    508508} 
Note: See TracChangeset for help on using the changeset viewer.