Changeset 1715 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 11/06/06 20:47:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1713 r1715 26 26 27 27 28 #define ABS_CONTRIBUTION_WEIGHT 1.0f 29 28 30 // warning: Should not count origin object for sampling because it disturbs heuristics 29 #define SAMPLE_ORIGIN_OBJECTS 1// matt temp31 #define SAMPLE_ORIGIN_OBJECTS 0 // matt temp 30 32 31 33 // $$JB HACK … … 666 668 bool success = parser.ParseViewCellsFile(filename, &vm, objects, bconverter); 667 669 670 cout<<"viewcells parsed "<<endl<<flush; 671 668 672 if (success) 669 673 { … … 2028 2032 } 2029 2033 2030 return ray.mRelativePvsContribution; 2034 return ABS_CONTRIBUTION_WEIGHT*ray.mPvsContribution + 2035 (1.0f - ABS_CONTRIBUTION_WEIGHT)*ray.mRelativePvsContribution; 2031 2036 } 2032 2037 … … 2415 2420 float viewSpaceFilterSize = Magnitude(mViewSpaceBox.Size())*relViewSpaceFilterSize; 2416 2421 float spatialFilterSize = Magnitude(kdTree->GetBox().Size())*relSpatialFilterSize; 2417 2422 2418 2423 int i; 2419 2424 for (i=0, it = mViewCells.begin(); it != it_end; ++ it, ++ i) { 2420 2421 kdTree,2422 viewSpaceFilterSize,2423 spatialFilterSize,2424 newPvs[i]2425 );2426 } 2427 2425 ApplyFilter(*it, 2426 kdTree, 2427 viewSpaceFilterSize, 2428 spatialFilterSize, 2429 newPvs[i] 2430 ); 2431 } 2432 2428 2433 // now replace all pvss 2429 2434 for (i = 0, it = mViewCells.begin(); it != it_end; ++ it, ++ i) { 2430 2431 2432 2433 2434 2435 2436 ObjectPvs &pvs = (*it)->GetPvs(); 2437 pvs.Clear(); 2438 pvs = newPvs[i]; 2439 newPvs[i].Clear(); 2435 2440 } 2436 2441 … … 2489 2494 } 2490 2495 2496 2497 void 2498 ViewCellsManager::ApplyFilter2(ViewCell *viewCell, 2499 KdTree *kdTree, 2500 const float filterSize, 2501 ObjectPvs &pvs 2502 ) 2503 { 2504 // first determine the average 2505 2506 2507 2508 } 2509 2491 2510 2492 2511 void ViewCellsManager::ExportColor(Exporter *exporter, … … 5622 5641 } 5623 5642 5624 return ray.mRelativePvsContribution; 5643 5644 5645 return ABS_CONTRIBUTION_WEIGHT*ray.mPvsContribution + 5646 (1.0f - ABS_CONTRIBUTION_WEIGHT)*ray.mRelativePvsContribution; 5625 5647 } 5626 5648
Note: See TracChangeset
for help on using the changeset viewer.