Changeset 1110
- Timestamp:
- 07/10/06 18:18:22 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
r1109 r1110 775 775 // add front and back view cell to "Potentially Visbilie View Cells" 776 776 // of the objects in front and back pvs 777 RemoveParentViewCellReferences(tData.mNode-> mViewCell);778 AddViewCellReferences(frontLeaf-> mViewCell);779 AddViewCellReferences(backLeaf-> mViewCell);777 RemoveParentViewCellReferences(tData.mNode->GetViewCell()); 778 AddViewCellReferences(frontLeaf->GetViewCell()); 779 AddViewCellReferences(backLeaf->GetViewCell()); 780 780 781 781 … … 863 863 864 864 // remove reference count of view cells 865 -- object->mViewCellPvs; 866 867 set<KdLeaf *>::const_iterator kit, kit_end = obj->mKdLeaves.end(); 868 869 for (kit = obj->mKdLeaves.begin(); kit != kit_end; ++ kit) 870 { 871 KdLeaf *leaf = *kit; 872 873 if (!leaf->Mailed()) 874 { 875 leaf->mViewCellPvs.RemoveSample(parent, high_contri); 876 leaf->Mail(); 877 } 878 } 865 object->mViewCellPvs.RemoveSample(parent, high_contri); 879 866 } 880 867 } … … 886 873 887 874 // Add front view cell to the object pvsss 888 ObjectPvsMap::const_iterator oit, oit_end = front->GetPvs().mEntries.end();889 890 for (oit = front->GetPvs().mEntries.begin(); oit != oit_end; ++ oit)875 ObjectPvsMap::const_iterator oit, oit_end = vc->GetPvs().mEntries.end(); 876 877 for (oit = vc->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 891 878 { 892 879 Intersectable *object = (*oit).first; 893 880 894 881 // increase reference count of view cells 895 ++ object->mViewCellPvs; 896 897 set<KdLeaf *>::const_iterator kit, kit_end = obj->mKdLeaves.end(); 898 899 for (kit = obj->mKdLeaves.begin(); kit != kit_end; ++ kit) 900 { 901 KdLeaf *leaf = *kit; 902 903 if (!leaf->Mailed()) 904 { 905 leaf->mViewCellPvs.AddSample(front, 1); 906 leaf->Mail(); 907 } 908 } 882 object->mViewCellPvs.AddSample(vc, 1); 909 883 } 910 884 } … … 944 918 } 945 919 946 Intersectable *obj = ray->mOriginObject;920 obj = ray->mOriginObject; 947 921 948 922 if (obj) -
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
r1109 r1110 736 736 the objects. 737 737 */ 738 void RemoveParentViewCellReferences(ViewCell *parent); 738 void RemoveParentViewCellReferences(ViewCell *parent) const; 739 739 740 /** Adds references to the view cell to the kd nodes associated with the objects. 740 741 */
Note: See TracChangeset
for help on using the changeset viewer.