Changeset 1909 for GTP/trunk/Lib


Ignore:
Timestamp:
12/17/06 16:11:12 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
2 edited

Legend:

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

    r1908 r1909  
    656656                const float avgRayContri =  
    657657                        AvgRayContribution(pvs, splitCandidate.mParentData.mNumRays); 
    658  
    659                 //Debug << "bvh avgRayContri: " << avgRayContri << " #pvs: " << pvs << " #rays: " << splitCandidate.mParentData.mNumRays << endl; 
    660                 //cout << "bvh avgRayContri: " << avgRayContri << endl; 
    661658 
    662659                // high avg ray contri, the result is influenced by undersampling 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r1907 r1909  
    863863        { 
    864864                const int pvs = EvalPvsEntriesSize(*splitCandidate.mParentData.mRays); 
    865                 const float avgRayContri = (float)pvs / ((float)splitCandidate.mParentData.mRays->size() + Limits::Small); 
    866  
    867                 //Debug << "vsp avgRayContri: " << avgRayContri << " #pvs: " << pvs << " #rays: " << splitCandidate.mParentData.mRays->size() << endl; 
    868                 //cout << "vsp avgRayContri: " << avgRayContri << endl; 
     865                const float avgRayContri = (float)pvs /  
     866                        ((float)splitCandidate.mParentData.mRays->size() + Limits::Small); 
    869867 
    870868                // high avg ray contri very, the result is influenced by undersampling 
     
    977975 
    978976#if WORK_WITH_VIEWCELLS 
    979                 // remove "parent" view cell from pvs of all objects (traverse trough rays) 
     977                // remove "parent" view cell from pvs of all objects (traverse through rays) 
    980978                RemoveParentViewCellReferences(tData.mNode->GetViewCell()); 
    981979#endif 
     
    12001198        } 
    12011199 
     1200        ////// 
    12021201        //-- separately handle objects which are in several kd leaves 
    12031202 
     
    13961395        //-- compute cost 
    13971396 
    1398         const float lowerPvsLimit = (float)mViewCellsManager->GetMinPvsSize(); 
    1399         const float upperPvsLimit = (float)mViewCellsManager->GetMaxPvsSize(); 
    1400  
    14011397        const float pOverall = sizeBox; 
    14021398        const float pBack = position - minBox; 
    14031399        const float pFront = maxBox - position; 
    14041400 
    1405         const float penaltyOld = EvalPvsPenalty(pvsCost, lowerPvsLimit, upperPvsLimit); 
    1406     const float penaltyFront = EvalPvsPenalty(pvsFront, lowerPvsLimit, upperPvsLimit); 
    1407         const float penaltyBack = EvalPvsPenalty(pvsBack, lowerPvsLimit, upperPvsLimit); 
     1401        const float penaltyOld = pvsCost; 
     1402    const float penaltyFront = pvsFront; 
     1403        const float penaltyBack = pvsBack; 
    14081404         
    14091405        const float oldRenderCost = penaltyOld * pOverall + Limits::Small; 
     
    14861482                        { 
    14871483                                //-- place split plane using heuristics 
    1488  
    14891484                                nCostRatio[axis] = 
    14901485                                        EvalLocalCostHeuristics(tData, 
     
    14971492                        { 
    14981493                                //-- split plane position is spatial median                              
    1499                                  
    15001494                                nPosition[axis] = (box.Min()[axis] + box.Max()[axis]) * 0.5f; 
    15011495                                nCostRatio[axis] = EvalLocalSplitCost(tData, 
     
    15751569        AxisAlignedBox3 backBox; 
    15761570 
    1577         data.mBoundingBox.Split(candidatePlane.mAxis, candidatePlane.mPosition, frontBox, backBox); 
     1571        data.mBoundingBox.Split(candidatePlane.mAxis,  
     1572                                                        candidatePlane.mPosition,  
     1573                                                        frontBox,  
     1574                                                        backBox); 
    15781575 
    15791576        // probability that view point lies in back / front node 
     
    16091606        return renderCostDecrease; 
    16101607} 
    1611  
    16121608 
    16131609 
Note: See TracChangeset for help on using the changeset viewer.