Changeset 1291 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 08/28/06 18:42:33 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1287 r1291 1788 1788 Vector3 termination = hray.Extrap(tmax); 1789 1789 1790 ViewCell::NewMail(); 1791 1790 1792 // traverse the view space subdivision 1791 1793 CastLineSegment(origin, termination, viewcells); … … 1807 1809 // if ray not outside of view space 1808 1810 float contribution; 1809 if (ray.mTerminationObject) { 1810 if (viewcell->GetPvs().GetSampleContribution(ray.mTerminationObject, 1811 ray.mPdf, 1812 contribution)) 1813 { 1814 ++ ray.mPvsContribution; 1815 ray.mRelativePvsContribution += contribution; 1816 } 1811 1812 if (ray.mTerminationObject) 1813 { 1814 cout << "f"; 1815 if (viewcell->GetPvs().GetSampleContribution(ray.mTerminationObject, 1816 ray.mPdf, 1817 contribution)) 1818 { 1819 ++ ray.mPvsContribution; 1820 ray.mRelativePvsContribution += contribution; 1821 } 1817 1822 } 1823 1824 #if SAMPLE_ORIGIN_OBJECTS 1825 1818 1826 // for directional sampling it is important to count only contributions 1819 1827 // made in one direction!!! 1820 1828 // the other contributions of this sample will be counted for the oposite ray! 1821 #if SAMPLE_ORIGIN_OBJECTS 1829 1822 1830 if (ray.mOriginObject && 1823 1831 viewcell->GetPvs().GetSampleContribution(ray.mOriginObject, … … 3486 3494 3487 3495 3488 3489 3496 /**************************************************************************/ 3490 3497 /* VspBspViewCellsManager implementation */ … … 5506 5513 Vector3 termination = hray.Extrap(tmax); 5507 5514 5515 ViewCell::NewMail(); 5516 5508 5517 // traverse the view space subdivision 5509 5518 CastLineSegment(origin, termination, viewcells); 5510 5519 5511 5520 if (storeViewCells) 5512 { // copy viewcells memory efficiently 5521 { 5522 // copy viewcells memory efficiently 5513 5523 ray.mViewCells.reserve(viewcells.size()); 5514 5524 ray.mViewCells = viewcells;
Note: See TracChangeset
for help on using the changeset viewer.