Ignore:
Timestamp:
01/23/08 01:38:11 (16 years ago)
Author:
mattausch
Message:

revived hash pvs

File:
1 edited

Legend:

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

    r2625 r2633  
    1717{ 
    1818   
    19 #define GVS_DEBUG 1 
     19#define GVS_DEBUG 0 
    2020 
    2121struct VizStruct 
     
    3737mCurrentViewCell(NULL), 
    3838mCurrentViewPoint(Vector3(0.0f, 0.0f, 0.0f)) 
     39//,mGenericStats(0) 
    3940{ 
    4041        Environment::GetSingleton()->GetIntValue("GvsPreprocessor.totalSamples", mTotalSamples); 
     
    219220                return false; 
    220221 
     222//      cout << "t"; 
    221223        if (0 && GVS_DEBUG) 
    222224                mVssRays.push_back(new VssRay(*vssRay)); 
     
    592594 
    593595        //CLEAR_CONTAINER(invalidSamples); 
    594         Debug << "generated " <<  numSamples << " samples in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
     596        //Debug << "generated " <<  numSamples << " samples in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
    595597        return (int)simpleRays.size(); 
    596598} 
     
    606608 
    607609                HandleRay(ray); 
    608  
    609                 //if (!HandleRay(ray)); 
    610                 //      invalidSamples.push_back(ray); 
     610                //if (!HandleRay(ray)) invalidSamples.push_back(ray); 
    611611        } 
    612612} 
     
    675675 
    676676 
    677 //void GvsPreprocessor::VisualizeViewCell(ViewCell *vc) 
    678677void GvsPreprocessor::VisualizeViewCell(const ObjectContainer &objects) 
    679678{ 
    680679    Intersectable::NewMail(); 
    681  
    682680        Material m; 
    683681         
     
    760758        int passSamples = 0; 
    761759 
    762         //if (mCurrentViewCell->GetId() != 82975 )return; 
     760        mGenericStats = 0; 
    763761 
    764762        //while (mGvsStats.mPerViewCellSamples < mTotalSamples)  
     
    789787                        cout << "\nPass " << mPass << " #samples: " << mGvsStats.mPerViewCellSamples << endl; 
    790788                        cout << "contribution=" << mGvsStats.mPassContribution << " (of " << mMinContribution << ")" << endl; 
     789 
     790                        //mGenericStats = GvsStats.mGvsStats.mPassContribution; 
    791791 
    792792                        // termination criterium 
     
    964964} 
    965965 
    966 /* 
    967 void GvsPreprocessor::ComputeRenderError() 
    968 { 
    969         cout << "computing gvs render error" << endl; 
    970         vector<ViewCellPoints *> *vcPoints = mViewCellsManager->GetViewCellPoints(); 
    971  
    972         vector<ViewCellPoints *>::const_iterator vit, vit_end = vcPoints->end(); 
    973  
    974         for (vit = vcPoints->begin(); vit != vit_end; ++ vit) 
    975         { 
    976                 ViewCellPoints *vcPoints = *vit; 
    977                  
    978                 renderer->EvalPvsStat(vcPoints->second); 
    979  
    980                 mStats << 
    981                         "#ViewCell\n" << vcPoints->first->GetId() << endl << 
    982                         "#AvgPvsRenderError\n" <<renderer->mPvsStat.GetAvgError() << endl << 
    983                         "#AvgPixelError\n" << renderer->GetAvgPixelError() << endl << 
    984                         "#MaxPixelError\n" << renderer->GetMaxPixelError() << endl << 
    985                         "#MaxPvsRenderError\n" << renderer->mPvsStat.GetMaxError() << endl << 
    986                         "#ErrorFreeFrames\n" << renderer->mPvsStat.GetErrorFreeFrames() << endl << 
    987                         "#AvgRenderPvs\n" << renderer->mPvsStat.GetAvgPvs() << endl; 
    988         } 
    989 } 
    990 */ 
    991966 
    992967void GvsPreprocessor::UpdatePvs(ViewCell *currentViewCell) 
     
    13001275        mGvsStats.mTotalTime += mGvsStats.mTimePerViewCell; 
    13011276 
    1302         //lastTime = currentTime; 
    1303  
    13041277        mGvsStats.Stop(); 
    13051278        mGvsStats.Print(mGvsStatsStream); 
Note: See TracChangeset for help on using the changeset viewer.