Changeset 1551 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 10/02/06 19:07:38 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r1545 r1551 875 875 } 876 876 877 viewCell->mLeaf = leaf;877 viewCell->mLeaves.push_back(leaf); 878 878 879 879 if (mUseAreaForPvs) … … 973 973 974 974 975 ////////////////// 975 976 //-- terminate traversal and create new view cell 976 977 if (newNode->IsLeaf()) … … 993 994 mBspStats.sampleContributions +=(int) sampCon; 994 995 996 viewCell->mLeaves.push_back(leaf); 997 998 /////////// 995 999 //-- store additional info 996 1000 if (mStoreRays) … … 1003 1007 } 1004 1008 } 1005 1006 1007 viewCell->mLeaf = leaf; 1008 1009 1009 1010 if (mUseAreaForPvs) 1010 1011 viewCell->SetArea(tData.mProbability); … … 2991 2992 BspNodeGeometry &vcGeom) const 2992 2993 { 2994 // if false, cannot construct geometry for interior leaf 2995 if (!mViewCellsTree) 2996 return; 2997 2993 2998 ViewCellContainer leaves; 2994 2995 2999 mViewCellsTree->CollectLeaves(vc, leaves); 2996 3000 … … 2999 3003 for (it = leaves.begin(); it != it_end; ++ it) 3000 3004 { 3001 BspLeaf *l = dynamic_cast<BspViewCell *>(*it)->mLeaf; 3002 3003 ConstructGeometry(l, vcGeom); 3005 BspViewCell *bspVc = dynamic_cast<BspViewCell *>(*it); 3006 vector<BspLeaf *>::const_iterator bit, bit_end = bspVc->mLeaves.end(); 3007 3008 for (bit = bspVc->mLeaves.begin(); bit != bit_end; ++ bit) 3009 { 3010 BspLeaf *l = *bit; 3011 ConstructGeometry(l, vcGeom); 3012 } 3004 3013 } 3005 3014 } … … 3806 3815 if (ray->mViewCells.size() < 2) 3807 3816 continue; 3808 //TODO viewcellhierarchy 3817 3809 3818 iit = ray->mViewCells.begin(); 3810 3819 BspViewCell *bspVc = dynamic_cast<BspViewCell *>(*(iit ++)); 3811 BspLeaf *leaf = bspVc->mLea f;3820 BspLeaf *leaf = bspVc->mLeaves[0]; 3812 3821 3813 3822 // traverse intersections … … 3818 3827 BspLeaf *prevLeaf = leaf; 3819 3828 bspVc = dynamic_cast<BspViewCell *>(*iit); 3820 leaf = bspVc->mLea f;3829 leaf = bspVc->mLeaves[0]; // exactly one leaf 3821 3830 3822 3831 // view space not valid or same view cell … … 3984 3993 { 3985 3994 ExportNode(mRoot, stream); 3986 3987 3995 return true; 3988 3996 }
Note: See TracChangeset
for help on using the changeset viewer.