Changeset 324


Ignore:
Timestamp:
10/13/05 11:29:35 (19 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp

    r322 r324  
    682682        bool foundFront = !extractFront, foundBack = !extractBack; 
    683683 
    684         PolygonContainer::const_iterator it, it_end = coincident.end(); 
     684        PolygonContainer::const_iterator it =  
     685                coincident.begin(), it_end = coincident.end(); 
    685686 
    686687        //-- 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) 
    691691                { 
    692692                        *backViewCell = dynamic_cast<ViewCell *>((*it)->mParent); 
     
    699699                } 
    700700        } 
     701        //if (extractFront && foundFront)       Debug << "front view cell: " << *frontViewCell << endl; 
     702        //if (extractBack && foundBack) Debug << "back view cell: " << *backViewCell << endl; 
    701703} 
    702704 
     
    932934{ 
    933935        int candidateIdx = Random(currentIdx --); 
    934         //Debug << "new candidate " << candidateIdx << endl; 
    935936 
    936937        // swap candidates to avoid testing same plane 2 times 
     
    940941         
    941942        return currentIdx; 
     943        //return Random((int)polys.size()); 
    942944} 
    943945 
     
    10321034 
    10331035        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 
    10351037                val += sLargestPolyAreaFactor * (float)polys.size() / sumPolyArea; 
    10361038 
     
    11121114        environment->GetFloatValue("MeshKdTree.splitBorder", sSplitBorder); 
    11131115        environment->GetFloatValue("MeshKdTree.Termination.maxCostRatio", sMaxCostRatio); 
     1116 
    11141117        environment->GetBoolValue("BspTree.storeSplitPolys", sStoreSplitPolys); 
    11151118 
Note: See TracChangeset for help on using the changeset viewer.