Ignore:
Timestamp:
01/19/06 15:30:44 (18 years ago)
Author:
bittner
Message:

debug version looking for glrenderer bug...

File:
1 edited

Legend:

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

    r549 r556  
    8585  if (!mDetectEmptyViewSpace) 
    8686        ray.mFlags &= ~Ray::CULL_BACKFACES; 
     87  else 
     88        ray.mFlags |= Ray::CULL_BACKFACES; 
     89 
    8790 
    8891  // cast ray to KD tree to find intersection with other objects 
     
    113116  if (!mDetectEmptyViewSpace) 
    114117        ray.mFlags &= ~Ray::CULL_BACKFACES; 
     118  else 
     119        ray.mFlags |= Ray::CULL_BACKFACES; 
    115120 
    116121  if (mKdTree->CastRay(ray)) { 
     
    130135        // cast again to ensure that there is no objectA 
    131136        SetupRay(ray, pointB, direction); 
     137        ray.mFlags |= Ray::CULL_BACKFACES; 
    132138        if (mKdTree->CastRay(ray)) { 
    133139          objectA = ray.intersections[0].mObject; 
     
    315321  //    exporter->ExportKdTree(*mKdTree); 
    316322  exporter->SetFilled(); 
    317   // temporarily do not export the scene 
    318   if (0) 
     323  // $$JB temporarily do not export the scene 
     324  if (1) 
    319325        exporter->ExportScene(mSceneGraph->mRoot); 
    320326  exporter->SetWireframe(); 
     
    459465        //      renderer->mRenderingFinished.wait(&mutex); 
    460466        //      mutex.unlock(); 
     467 
    461468        renderer->EvalPvsStat(); 
    462469        mStats << 
     
    470477RssPreprocessor::ComputeVisibility() 
    471478{ 
     479 
     480  if (renderer) 
     481        renderer->InitGL(); 
    472482   
    473483  //  connect(this, SIGNAL(EvalPvsStat()), renderer, SLOT(EvalPvsStat()) ); 
     
    698708                Vector3 direction = GetDirection(viewpoint, mViewSpaceBox); 
    699709                rays.push_back(SimpleRay(viewpoint, direction, 1.0f)); 
    700                 rays.mSumProbabilities+=1.0f; 
     710                rays.mSumPdf += 1.0f; 
    701711          } 
    702712        } else { 
     
    704714        } 
    705715 
    706         rays.NormalizeProbabilities(); 
     716        rays.NormalizePdf(); 
    707717         
    708718        for (int i=0; i < rays.size(); i++) 
    709           CastRay(rays[i].mOrigin, rays[i].mDirection, rays[i].mProbability, vssRays); 
     719          CastRay(rays[i].mOrigin, rays[i].mDirection, rays[i].mPdf, vssRays); 
    710720 
    711721         
     
    802812  if (mUseViewcells) { 
    803813 
    804  
    805   //-- render simulation after merge 
    806   cout << "\nevaluating bsp view cells render time after merge ... "; 
    807    
    808   mRenderSimulator->RenderScene(); 
    809   SimulationStatistics ss; 
    810   mRenderSimulator->GetStatistics(ss); 
    811  
    812   cout << " finished" << endl; 
    813   cout << ss << endl; 
    814   Debug << ss << endl; 
    815  
    816   } 
    817  
     814         
     815        //-- render simulation after merge 
     816        cout << "\nevaluating bsp view cells render time after merge ... "; 
     817         
     818        mRenderSimulator->RenderScene(); 
     819        SimulationStatistics ss; 
     820        mRenderSimulator->GetStatistics(ss); 
     821         
     822        cout << " finished" << endl; 
     823        cout << ss << endl; 
     824        Debug << ss << endl; 
     825         
     826  } 
     827 
     828  cerr<<"Deleting RSS tree...\n"; 
    818829  delete rssTree; 
     830  cerr<<"Done.\n"; 
     831 
    819832   
    820833  return true; 
Note: See TracChangeset for help on using the changeset viewer.