Ignore:
Timestamp:
11/07/05 01:27:32 (19 years ago)
Author:
mattausch
Message:

fixed bug in pvs criterium, computing real area

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp

    r383 r384  
    945945        const float objRt = 1.0f;  
    946946         // const overhead for crossing a view cell border 
    947         const float vcOverhead = 0.01f; 
     947        const float vcOverhead = 0;//0.01f; 
    948948         
    949949        // total area of view cells 
     
    955955 
    956956        ViewCellContainer::const_iterator it, it_end = viewCells.end(); 
    957         PolygonContainer::const_iterator pit; 
    958  
     957         
    959958        for (it = viewCells.begin(); it != it_end; ++ it) 
    960959        { 
     
    965964                mBspTree->ConstructGeometry(dynamic_cast<BspViewCell *>(*it), cell); 
    966965 
    967                 for (pit = cell.begin(); pit != cell.end(); ++ pit) 
    968                         area += (*pit)->GetArea(); 
    969                  
    970                 renderTime += area * RenderPvs(*(*it), objRt); 
     966                area = Polygon3::GetArea(cell); 
     967                 
     968                renderTime += area * RenderPvs(*(*it), objRt) + vcOverhead; 
    971969                totalArea += area; 
    972970        } 
     
    974972        renderTime /= totalArea; 
    975973 
    976         Debug << "render time without overhead: " << renderTime * 1e-3 << endl; 
    977          
    978         renderTime += (float)viewCells.size() * vcOverhead; 
     974        //Debug << "render time without overhead: " << renderTime * 1e-3 << endl; 
     975        //renderTime += (float)viewCells.size() * vcOverhead; 
    979976 
    980977        return renderTime; 
Note: See TracChangeset for help on using the changeset viewer.