Changeset 1913 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 12/20/06 12:18:41 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1912 r1913 743 743 // assume pvs sampled sufficiently => take child pvs 744 744 if (avgRayContri < mMinAvgRayContri) 745 { 746 cout << "here4 child" << endl; 745 747 return childPvs; 746 748 } 747 749 // assume pvs not sampled sufficiently => take total pvs 748 750 if (avgRayContri > mMaxAvgRayContri) 751 { 752 cout << "here9 parent" << endl; 749 753 return totalPvs; 754 } 750 755 751 756 const float alpha = (mMaxAvgRayContri - avgRayContri) / 752 757 (mMaxAvgRayContri - mMinAvgRayContri); 753 758 754 cout << "here41 **************** " << alpha << " " << childPvs << " " << totalPvs << endl; 755 756 const float beta = (1.0f - alpha) * (totalPvs + childPvs) / totalPvs; 757 758 return childPvs + beta; 759 const float beta = (1.0f - alpha) * (totalPvs - childPvs); 760 761 cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 762 763 const float newPvs = childPvs + beta; 764 765 if ((newPvs < childPvs - Limits::Small) || (newPvs > totalPvs + Limits::Small)) 766 cout << "Error!! " << newPvs << endl; 767 return newPvs; 759 768 } 760 769
Note: See TracChangeset
for help on using the changeset viewer.