- Timestamp:
- 10/13/05 11:29:35 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r322 r324 682 682 bool foundFront = !extractFront, foundBack = !extractBack; 683 683 684 PolygonContainer::const_iterator it, it_end = coincident.end(); 684 PolygonContainer::const_iterator it = 685 coincident.begin(), it_end = coincident.end(); 685 686 686 687 //-- find first view cells in front and back leafs 687 for (it = coincident.begin(); !(foundFront && foundBack) && 688 (it != it_end); ++ it) 689 { 690 if (DotProd((*it)->GetSupportingPlane().mNormal, splitPlane.mNormal) > 0) 688 for (; !(foundFront && foundBack) && (it != it_end); ++ it) 689 { 690 if (DotProd((*it)->GetNormal(), splitPlane.mNormal) > 0) 691 691 { 692 692 *backViewCell = dynamic_cast<ViewCell *>((*it)->mParent); … … 699 699 } 700 700 } 701 //if (extractFront && foundFront) Debug << "front view cell: " << *frontViewCell << endl; 702 //if (extractBack && foundBack) Debug << "back view cell: " << *backViewCell << endl; 701 703 } 702 704 … … 932 934 { 933 935 int candidateIdx = Random(currentIdx --); 934 //Debug << "new candidate " << candidateIdx << endl;935 936 936 937 // swap candidates to avoid testing same plane 2 times … … 940 941 941 942 return currentIdx; 943 //return Random((int)polys.size()); 942 944 } 943 945 … … 1032 1034 1033 1035 if (sSplitPlaneStrategy & LARGEST_POLY_AREA) 1034 // HACK (polys.size should be totalArea)1036 // HACK: polys.size should be total area so scaling is between 0 and 1 1035 1037 val += sLargestPolyAreaFactor * (float)polys.size() / sumPolyArea; 1036 1038 … … 1112 1114 environment->GetFloatValue("MeshKdTree.splitBorder", sSplitBorder); 1113 1115 environment->GetFloatValue("MeshKdTree.Termination.maxCostRatio", sMaxCostRatio); 1116 1114 1117 environment->GetBoolValue("BspTree.storeSplitPolys", sStoreSplitPolys); 1115 1118
Note: See TracChangeset
for help on using the changeset viewer.