- Timestamp:
- 07/26/06 09:22:09 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 1 deleted
- 4 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 /*******************************************************************/ -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1145 r1155 101 101 */ 102 102 float ComputeSampleContributions(const VssRayContainer &rays, 103 const bool addContributions, 104 const bool storeViewCells); 105 106 /** Add sample contributions to the viewcells they intersect */ 103 const bool addContributions, 104 const bool storeViewCells); 105 106 /** Add sample contributions to the viewcells they intersect 107 */ 107 108 void AddSampleContributions(const VssRayContainer &rays); 108 109 … … 116 117 */ 117 118 virtual float ComputeSampleContributions(VssRay &ray, 118 const bool addRays, 119 const bool addRays, 119 120 const bool storeViewCells); 120 121 … … 475 476 476 477 477 /** Returns true if this view cell is equivalent to a node of the spatial hierarchy. 478 /** Returns true if the view cell is equivalent to a 479 node of the spatial hierarchy. This function can be used for merged 480 view cell. 481 e.g. to see if the spatial tree can be reduced on this location 478 482 */ 479 483 virtual bool EqualToSpatialNode(ViewCell *viewCell) const; 484 485 /** If true, the kd nodes are stored instead of the object pvs. 486 */ 487 void SetStoreKdPvs(const bool storeKdPvs); 488 489 /** Returns true if the kd nodes are stored instead of the object pvs. 490 **/ 491 bool GetStoreKdPVs() const; 480 492 481 493 protected: … … 592 604 bool mPruneEmptyViewCells; 593 605 594 /// if the pvss in the view cell leaves and the interiors are up to date 606 /// if the values in the view cell leaves and the interiors are up to date 607 /// this is meant for lazy storing of the pvs, where only a scalar indicating 608 /// pvs size is stored in interiors and not the pvs itself. 595 609 bool mViewCellPvsIsUpdated; 596 610 … … 658 672 /// if pvs should be exported with view cells 659 673 bool mExportPvs; 674 675 bool mStoreKdPvs; 660 676 }; 661 677 -
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
r1149 r1155 508 508 { 509 509 mBoundingBox.Initialize(); 510 511 510 VssRayContainer::const_iterator rit, rit_end = rays.end(); 512 511
Note: See TracChangeset
for help on using the changeset viewer.