Changeset 1155 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 07/26/06 09:22:09 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1151 r1155 54 54 mMaxPvsRatio(1.0), 55 55 mViewCellPvsIsUpdated(false), 56 mPreprocessor(NULL) 56 mPreprocessor(NULL), 57 mStoreKdPvs(false) 57 58 { 58 59 mViewSpaceBox.Initialize(); … … 1361 1362 float 1362 1363 ViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays, 1363 const bool addRays, 1364 const bool addRays, 1364 1365 const bool storeViewCells 1365 1366 ) … … 1372 1373 1373 1374 float sum = 0.0f; 1375 1374 1376 for (it = rays.begin(); it != it_end; ++ it) 1375 1377 { 1376 1378 sum += ComputeSampleContributions(*(*it), addRays, storeViewCells); 1377 //ComputeSampleContributions(*(*it), addRays);1378 // sum += (*it)->mPvsContribution;1379 1379 } 1380 1380 … … 1867 1867 CastLineSegment(origin, termination, viewcells); 1868 1868 1869 //const bool storeViewcells = !addRays;1870 //return 0;1871 1869 if (storeViewCells) 1872 { 1873 // copy viewcells memory efficiently 1870 { // copy viewcells memory efficiently 1874 1871 ray.mViewCells.reserve(viewcells.size()); 1875 1872 ray.mViewCells = viewcells; … … 1909 1906 } 1910 1907 1911 1908 // if addrays is true, sampled entities are stored in the pvs 1912 1909 if (addRays) 1913 1910 { … … 1919 1916 { 1920 1917 // if ray not outside of view space 1921 if (ray.mTerminationObject) 1922 viewcell->GetPvs().AddSample(ray.mTerminationObject, ray.mPdf); 1923 1918 1919 // add kd cell 1920 if (ray.mTerminationObject) 1921 { 1922 if (!mStoreKdPvs) 1923 { 1924 viewcell->GetPvs().AddSample(ray.mTerminationObject, ray.mPdf); 1925 } 1926 else 1927 { 1928 // todo 1929 //viewcell->GetPvs().AddSample(ray.mTerminationNode, ray.mPdf); 1930 } 1931 } 1932 1924 1933 #if 0 1925 1934 if (ray.mOriginObject) … … 2446 2455 2447 2456 2457 void ViewCellsManager::SetStoreKdPvs(const bool storeKdPvs) 2458 { 2459 mStoreKdPvs = storeKdPvs; 2460 } 2461 2462 2463 bool ViewCellsManager::GetStoreKdPVs() const 2464 { 2465 return mStoreKdPvs; 2466 } 2467 2448 2468 2449 2469 /*******************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.