Ignore:
Timestamp:
11/04/05 03:47:27 (19 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r375 r378  
    2424int BspTree::sTermMaxRays = -1; 
    2525int BspTree::sMinPvsDif = 10; 
     26int BspTree::sMinPvs = 10; 
     27int BspTree::sMaxPvs = 500; 
    2628 
    2729float BspTree::sCt_div_ci = 1.0f; 
     
    349351        app << setprecision(4); 
    350352 
     353        app << "#N_OVERALLPVS ( objects in PVS )\n" << pvs << endl; 
     354 
    351355        app << "#N_PMAXPVS ( largest PVS )\n" << maxPvs << endl; 
    352356 
     
    14821486        Vector3::sDistToleranceSqrt = Vector3::sDistTolerance * Vector3::sDistTolerance; 
    14831487 
    1484         environment->GetIntValue("ViewCells.minPvsDif", sMinPvsDif); 
     1488        // post processing stuff 
     1489        environment->GetIntValue("ViewCells.PostProcessing.minPvsDif", sMinPvsDif); 
     1490        environment->GetIntValue("ViewCells.PostProcessing.minPvs", sMinPvs); 
     1491        environment->GetIntValue("ViewCells.PostProcessing.maxPvs", sMaxPvs); 
    14851492 
    14861493    Debug << "BSP max depth: " << sTermMaxDepth << endl; 
     
    18141821                return false; 
    18151822 
    1816         /*Debug << "merge (" << sMinPvsDif << ")" << endl; 
    1817         Debug << "size f: " << fvc->GetPvs().GetSize() << ", " 
    1818                   << "size b: " << bvc->GetPvs().GetSize() << endl; 
    1819          
    1820         Debug << "diff f: " << fvc->GetPvs().Diff(bvc->GetPvs()) << ", " 
    1821                   << "diff b: " << bvc->GetPvs().Diff(fvc->GetPvs()) << endl;*/ 
    1822  
    1823     if ((fvc->GetPvs().Diff(bvc->GetPvs()) < sMinPvsDif) && 
    1824             (bvc->GetPvs().Diff(fvc->GetPvs()) < sMinPvsDif)) 
    1825                 return true; 
    1826  
     1823        int fdiff = fvc->GetPvs().Diff(bvc->GetPvs()); 
     1824 
     1825        if (fvc->GetPvs().GetSize() + fdiff < sMaxPvs) 
     1826        { 
     1827                if ((fvc->GetPvs().GetSize() < sMinPvs) ||       
     1828                        (bvc->GetPvs().GetSize() < sMinPvs) || 
     1829                        ((fdiff < sMinPvsDif) && (bvc->GetPvs().Diff(fvc->GetPvs()) < sMinPvsDif))) 
     1830                { 
     1831                        return true; 
     1832                } 
     1833        } 
     1834         
    18271835        return false; 
    18281836} 
Note: See TracChangeset for help on using the changeset viewer.