Ignore:
Timestamp:
03/11/07 16:14:59 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2227 r2228  
    105105        Environment::GetSingleton()->GetFloatValue( 
    106106                "Hierarchy.Termination.minGlobalCostRatio", mTermMinGlobalCostRatio); 
     107 
     108        Environment::GetSingleton()->GetFloatValue("Hierarchy.minRenderCost", mMinRenderCost); 
     109 
    107110        Environment::GetSingleton()->GetIntValue( 
    108111                "Hierarchy.Termination.globalCostMissTolerance", mTermGlobalCostMissTolerance); 
     
    179182        Debug << "max avg rays per object: " << mMaxAvgRaysPerObject << endl; 
    180183        Debug << "mín avg rays per object: " << mMinAvgRaysPerObject << endl; 
     184        Debug << "mín render cost: " << mMinRenderCost << endl; 
    181185 
    182186        // for comparing it with byte - value 
     
    833837                                                                                 const float avgRaysPerObjects) const 
    834838{ 
     839        // don't correct pvss 
     840        if (mMaxAvgRaysPerObject <= mMinAvgRaysPerObject) 
     841        { 
     842                return childPvs; 
     843        } 
     844         
    835845        // assume pvs sampled sufficiently => take child pvs 
    836846        if (avgRaysPerObjects > mMaxAvgRaysPerObject) 
     
    838848                return childPvs; 
    839849        } 
    840         // assume pvs not sampled sufficiently => take total pvs 
    841         else if (avgRaysPerObjects <= mMinAvgRaysPerObject) 
    842         { 
    843                 cout << "b ";// << avgRaysPerObjects << " "; 
     850 
     851        // assume pvs not sampled sufficiently => pvs equal to parent pvs 
     852        // we should not subdivide further from this point 
     853        if (avgRaysPerObjects <= mMinAvgRaysPerObject) 
     854        { 
     855                cout << "t ";// << avgRaysPerObjects << " "; 
    844856                return totalPvs; 
    845857        } 
     858 
     859        /////////// 
     860        //-- blend pvss 
    846861 
    847862        const float alpha = (mMaxAvgRaysPerObject - avgRaysPerObjects) /  
     
    857872        const float newPvs = alpha * childPvs + (1.0f - alpha) * totalPvs; 
    858873#endif 
    859 cout << "c ";// << avgRaysPerObjects << " "; 
     874cout << "b ";// << avgRaysPerObjects << " "; 
    860875        //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 
    861876         
     
    927942         
    928943        mPriority = sc->GetPriority(); 
     944 
     945        cout << sc->Type() << " "; 
    929946 
    930947        ////////// 
     
    11601177                { 
    11611178                        //sc->CollectDirtyCandidates(dirtyCandidates, true); 
    1162                         //if (steps % 10 == 0) 
    1163                                 cout << sc->Type() << " "; 
     1179                        //if (steps % 10 == 0) cout << sc->Type() << " "; 
    11641180                         
    11651181                        ++ steps; 
Note: See TracChangeset for help on using the changeset viewer.