Ignore:
Timestamp:
03/06/06 19:02:49 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r675 r676  
    121121        environment->GetBoolValue("VspBspTree.useBreathFirstSplits", mBreathFirstSplits); 
    122122 
     123        environment->GetBoolValue("ViewCells.PostProcess.emptyViewCellsMergeAllowed", mEmptyViewCellsMergeAllowed); 
     124         
    123125        char subdivisionStatsLog[100]; 
    124126        environment->GetStringValue("VspBspTree.subdivisionStats", subdivisionStatsLog); 
     
    184186        mSplitCandidates = new vector<SortableEntry>; 
    185187 
     188        Debug << "here3" << endl; 
    186189        Debug << endl; 
    187190} 
     
    10111014                                                                           splitPlane, 
    10121015                                                                           mBox, 
    1013                                                                            0.0000001f); 
     1016                                                                           0.000000001f); 
    10141017                                                                           //mEpsilon); 
    10151018                 
     
    10231026                        frontData.mProbability = frontData.mGeometry->GetVolume(); 
    10241027                        backData.mProbability = tData.mProbability - frontData.mProbability; 
     1028 
     1029                        if (frontData.mProbability < -0.00001) 
     1030                                Debug << "here2 error: " << frontData.mProbability << endl; 
     1031                        if (backData.mProbability < -0.00001) 
     1032                                Debug << "here2 error: " << backData.mProbability << endl; 
     1033 
    10251034                        // clamp because of precision issues 
    1026                         if (frontData.mProbability < 0) frontData.mProbability = 0; 
    1027                         if (backData.mProbability < 0) backData.mProbability = 0; 
     1035                        if (0) 
     1036                        { 
     1037                                if (frontData.mProbability < 0) frontData.mProbability = 0; 
     1038                                if (backData.mProbability < 0) backData.mProbability = 0; 
     1039                        } 
    10281040                } 
    10291041        } 
     
    16921704                                                                  candidatePlane, 
    16931705                                                                  mBox, 
    1694                                                                   0.0000001f); 
     1706                                                                  0.000000001f); 
    16951707                                                                  //mEpsilon); 
    16961708 
     
    17001712                pBack = pOverall - pFront; 
    17011713 
     1714                if ((pFront < 0.001) || (pBack < 0.001)) 
     1715                { 
     1716                        Debug << "vol f " << pFront << " b " << pBack << " p " << pOverall << endl; 
     1717                        Debug << "real vol f " << pFront << " b " << geomBack.GetVolume() << " p " << pOverall << endl; 
     1718                        Debug << "polys f" << (int)geomFront.mPolys.size() << " b " << (int)geomFront.mPolys.size() << " data " << (int)data.mGeometry->mPolys.size() << endl; 
     1719                } 
     1720 
    17021721                // clamp because of possible precision issues 
    1703                 if (pFront < 0) pFront = 0; 
    1704                 if (pBack < 0) pBack = 0; 
     1722                if (0) 
     1723                { 
     1724                        if (pFront < 0) pFront = 0; 
     1725                        if (pBack < 0) pBack = 0; 
     1726                } 
    17051727        } 
    17061728        else 
     
    17851807                                                                  candidatePlane, 
    17861808                                                                  mBox, 
    1787  
    1788                                                                   mEpsilon); 
     1809                                                                  0.0000001f); 
     1810                                                                  //mEpsilon); 
    17891811 
    17901812        pOverall = data.mProbability; 
     
    17961818                 
    17971819                // clamp because of possible precision issues 
    1798                 if (pFront < 0) pFront = 0; 
    1799                 if (pBack < 0) pBack = 0; 
     1820                if (1) 
     1821                { 
     1822                        if (pFront <= 0) 
     1823                        { 
     1824                                //Debug << "error f: " << pFront << endl; 
     1825                                return 999; 
     1826                        } 
     1827 
     1828                        if (pBack <= 0)  
     1829                        { 
     1830                                //Debug << "error b: " << pBack << endl; 
     1831                                return 999; 
     1832                        } 
     1833                } 
    18001834        } 
    18011835        else 
     
    33353369                        { 
    33363370                                MergeCandidate mc(leaf->GetViewCell(), (*nit)->GetViewCell()); 
    3337                                 candidates.push_back(mc); 
     3371 
     3372                                // dont't merge view cells if they are empty and not front and back leaf of the same parent 
     3373                                // in the tree? 
     3374                                if (mEmptyViewCellsMergeAllowed || 
     3375                                        (!leaf->GetViewCell()->GetPvs().Empty() && ! (*nit)->GetViewCell()->GetPvs().Empty()) || 
     3376                    leaf->IsSibling(*nit)) 
     3377                                { 
     3378                                        candidates.push_back(mc); 
     3379                                } 
    33383380 
    33393381                                ++ numCandidates; 
Note: See TracChangeset for help on using the changeset viewer.