Changeset 602


Ignore:
Timestamp:
02/07/06 11:12:50 (18 years ago)
Author:
mattausch
Message:

found bug in Merge

Location:
trunk/VUT/GtpVisibilityPreprocessor/src
Files:
2 edited

Legend:

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

    r601 r602  
    887887                vc->SetArea(l->GetArea() + l->GetArea()); 
    888888        else 
    889                 vc->SetVolume(r->GetVolume() + r->GetVolume()); 
    890          
     889        { 
     890                vc->SetVolume(r->GetVolume() + l->GetVolume()); 
     891        } 
    891892        // important so other merge candidates sharing this view cell 
    892893        // are notified that the merge cost must be updated!! 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp

    r601 r602  
    413413        const float prop = mUseAreaForPvs ? geom->GetArea() : geom->GetVolume(); 
    414414 
    415         Debug << "herevol: " << geom->GetVolume() << endl; 
    416         Debug << "herevol:: " << mBox.GetVolume() << endl; 
    417  
    418415        VspBspTraversalData tData(mRoot, 
    419416                                                          new PolygonContainer(polys), 
     
    433430 
    434431        mTotalCost = tData.GetCost() / mBox.GetVolume(); 
    435  
    436         Debug << "**volume** " << mBox.GetVolume() << endl; 
    437432 
    438433        mSplits = 0; 
     
    675670         
    676671        // if geometry was not already computed 
    677         if (1)//!frontData.mGeometry && !backData.mGeometry) 
     672        if (!frontData.mGeometry && !backData.mGeometry) 
    678673        { 
    679674                frontData.mGeometry = new BspNodeGeometry(); 
     
    693688                else 
    694689                { 
    695                         //Debug << "here2" << endl; 
    696690                        frontData.mProbability = frontData.mGeometry->GetVolume(); 
    697                         backData.mProbability = tData.mProbability - frontData.mProbability; 
    698                         //backData.mProbability = backData.mGeometry->GetVolume(); 
     691                        backData.mProbability =  tData.mProbability - frontData.mProbability; 
    699692                } 
    700693        } 
     
    13411334                { 
    13421335                        pFront = geomFront.GetVolume(); 
    1343                         //pBack = pOverall - geomFront.GetVolume(); 
    1344                         pBack = geomBack.GetVolume(); 
    1345  
    1346                         /*Debug << "volume: " << data.mGeometry->GetVolume() << endl; 
    1347                         Debug << "volum1: " << geomFront.GetVolume() << endl; 
    1348                         Debug << "volum2: " << geomBack.GetVolume() << endl; 
    1349                         Debug << "sum_: " << geomFront.GetVolume() + geomBack.GetVolume() << endl;*/ 
     1336                        pBack = pOverall - geomFront.GetVolume(); 
    13501337                } 
    13511338                else 
Note: See TracChangeset for help on using the changeset viewer.