Changeset 1570 for GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
- Timestamp:
- 10/04/06 20:43:07 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
r1566 r1570 65 65 { 66 66 VssRay *newRay = ReverseSampling(currentRay, hitTriangle, oldRay); 67 // ray is not pushed into the queue => can delete ray 67 68 if (!HandleRay(newRay)) 68 {69 69 delete newRay; 70 }70 71 71 return true; 72 72 } … … 78 78 bool GvsPreprocessor::HandleRay(VssRay *vssRay) 79 79 { 80 mViewCellsManager->ComputeSampleContribution(*vssRay, true, false); 80 const bool storeRaysForViz = true; 81 mViewCellsManager->ComputeSampleContribution(*vssRay, true, storeRaysForViz); 81 82 82 83 // some pvs contribution for this ray? … … 85 86 //cout << " h " << mSampleContriPerPass << " " << mSamplesPerPass << " " << mTotalSamples << endl; 86 87 mRayQueue.push(vssRay); 87 mVssRays.push_back(new VssRay(*vssRay)); 88 89 if (storeRaysForViz) 90 { 91 ViewCellContainer::const_iterator vit, vit_end = vssRay->mViewCells.end(); 92 for (vit = vssRay->mViewCells.begin(); vit != vit_end; ++ vit) 93 { 94 (*vit)->mVssRays.push_back(new VssRay(*vssRay)); 95 } 96 } 97 //mVssRays.push_back(new VssRay(*vssRay)); 88 98 ++ mSampleContriPerPass; 89 99 … … 443 453 mViewCellsManager->PrintPvsStatistics(mStats); 444 454 455 char str[64]; sprintf(str, "tmp/pass%04d-", mPass); 456 445 457 // visualization 446 // mViewCellsManager->Visualize(mVssRays); 458 const bool exportRays = true; 459 const bool exportPvs = true; 460 mViewCellsManager->ExportSingleViewCells(mObjects, 10, false, exportPvs, exportRays, 100, str); 461 // remove pass samples 462 ViewCellContainer::const_iterator vit, vit_end = mViewCellsManager->GetViewCells().end(); 463 464 for (vit = mViewCellsManager->GetViewCells().begin(); vit != vit_end; ++ vit) 465 { 466 CLEAR_CONTAINER((*vit)->mVssRays); 467 } 468 447 469 CLEAR_CONTAINER(mVssRays); 448 470 // ComputeRenderError();
Note: See TracChangeset
for help on using the changeset viewer.