- Timestamp:
- 01/19/06 15:30:44 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r549 r556 85 85 if (!mDetectEmptyViewSpace) 86 86 ray.mFlags &= ~Ray::CULL_BACKFACES; 87 else 88 ray.mFlags |= Ray::CULL_BACKFACES; 89 87 90 88 91 // cast ray to KD tree to find intersection with other objects … … 113 116 if (!mDetectEmptyViewSpace) 114 117 ray.mFlags &= ~Ray::CULL_BACKFACES; 118 else 119 ray.mFlags |= Ray::CULL_BACKFACES; 115 120 116 121 if (mKdTree->CastRay(ray)) { … … 130 135 // cast again to ensure that there is no objectA 131 136 SetupRay(ray, pointB, direction); 137 ray.mFlags |= Ray::CULL_BACKFACES; 132 138 if (mKdTree->CastRay(ray)) { 133 139 objectA = ray.intersections[0].mObject; … … 315 321 // exporter->ExportKdTree(*mKdTree); 316 322 exporter->SetFilled(); 317 // temporarily do not export the scene318 if ( 0)323 // $$JB temporarily do not export the scene 324 if (1) 319 325 exporter->ExportScene(mSceneGraph->mRoot); 320 326 exporter->SetWireframe(); … … 459 465 // renderer->mRenderingFinished.wait(&mutex); 460 466 // mutex.unlock(); 467 461 468 renderer->EvalPvsStat(); 462 469 mStats << … … 470 477 RssPreprocessor::ComputeVisibility() 471 478 { 479 480 if (renderer) 481 renderer->InitGL(); 472 482 473 483 // connect(this, SIGNAL(EvalPvsStat()), renderer, SLOT(EvalPvsStat()) ); … … 698 708 Vector3 direction = GetDirection(viewpoint, mViewSpaceBox); 699 709 rays.push_back(SimpleRay(viewpoint, direction, 1.0f)); 700 rays.mSumP robabilities+=1.0f;710 rays.mSumPdf += 1.0f; 701 711 } 702 712 } else { … … 704 714 } 705 715 706 rays.NormalizeP robabilities();716 rays.NormalizePdf(); 707 717 708 718 for (int i=0; i < rays.size(); i++) 709 CastRay(rays[i].mOrigin, rays[i].mDirection, rays[i].mP robability, vssRays);719 CastRay(rays[i].mOrigin, rays[i].mDirection, rays[i].mPdf, vssRays); 710 720 711 721 … … 802 812 if (mUseViewcells) { 803 813 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"; 818 829 delete rssTree; 830 cerr<<"Done.\n"; 831 819 832 820 833 return true;
Note: See TracChangeset
for help on using the changeset viewer.