Changeset 481


Ignore:
Timestamp:
12/24/05 09:52:23 (18 years ago)
Author:
mattausch
Message:

removed axis aligned options for vsp bsp.
updated axis aligned heuristics for vsp bsp

Location:
trunk/VUT/GtpVisibilityPreprocessor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env

    r480 r481  
    267267                ct_div_ci 0.0 
    268268         
    269                 # axis aligned splits 
    270                 AxisAligned { 
    271                         minPolys 5000 
    272                         minRays 500 
    273                         minObjects 10 
    274                         ct_div_ci 0.5 
    275                 } 
    276         } 
    277          
    278         AxisAligned { 
    279                 splitBorder 0.01 
    280         } 
    281          
    282269         
    283270        Visualization { 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp

    r480 r481  
    16821682                 "4"); 
    16831683 
    1684         RegisterOption("VspBspTree.Termination.AxisAligned.ct_div_ci", 
    1685                         optFloat, 
    1686                         "-vsp_bsp_term_axis_aligned_ct_div_ci=", 
    1687                         "0.5"); 
    1688  
    1689         RegisterOption("VspBspTree.AxisAligned.splitBorder", 
    1690                         optFloat, 
    1691                         "-vsp_bsp__axis_aligned_split_border=", 
    1692                         "0.1"); 
    1693  
    1694         RegisterOption("VspBspTree.Termination.AxisAligned.minPolys", 
    1695                         optInt, 
    1696                         "-vsp_bsp_term_axis_aligned_max_polygons=", 
    1697                         "50"); 
    1698  
    1699         RegisterOption("VspBspTree.Termination.AxisAligned.minObjects", 
    1700                         optInt, 
    1701                         "-vsp_bsp_term_min_objects=", 
    1702                         "3"); 
    1703  
    1704         RegisterOption("VspBspTree.Termination.AxisAligned.minRays", 
    1705                         optInt, 
    1706                         "-vsp_bsp_term_axis_aligned_min_rays=", 
    1707                         "-1"); 
    1708  
    17091684        RegisterOption("VspBspTree.splitPlaneStrategy", 
    17101685                        optString, 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp

    r480 r481  
    590590                                                                                  const AxisAlignedBox3 &box, 
    591591                                                                                  const int pvsSize, 
    592                                                                                   int &axis, 
     592                                                                                  const int &axis, 
    593593                                          float &position) 
    594594{ 
     
    599599        int pvsFront; 
    600600 
    601         axis = box.Size().DrivingAxis(); 
     601        //axis = box.Size().DrivingAxis(); 
    602602 
    603603        SortSplitCandidates(rays, axis); 
     
    724724                box.Include((*ri).ExtrapTermination()); 
    725725 
    726         int axis = 0; 
    727726        const bool useCostHeuristics = false; 
    728  
    729         if (useCostHeuristics) 
    730         { 
    731                 float position; 
    732  
    733                 const float ratio =  
    734                         BestCostRatioHeuristics(*tData.mRays, 
    735                                                                     box, 
    736                                                                         tData.mPvs, 
    737                                                                         axis, 
    738                                                                         position); 
    739  
    740                 Vector3 normal(0,0,0); normal[axis] = 1; 
    741                 plane = Plane3(normal, position); 
    742  
    743                 return ratio; 
    744         } 
    745727 
    746728        //-- regular split 
     
    753735        const int sAxis = box.Size().DrivingAxis(); 
    754736                 
    755         for (axis = 0; axis < 3; ++ axis) 
     737        for (int axis = 0; axis < 3; ++ axis) 
    756738        { 
    757739                if (!mOnlyDrivingAxis || axis == sAxis) 
     
    764746                                nCostRatio[axis] = SplitPlaneCost(Plane3(normal, nPosition[axis]), tData); 
    765747                        } 
    766                          
     748                        else 
     749                        { 
     750                                nCostRatio[axis] =  
     751                                        BestCostRatioHeuristics(*tData.mRays, 
     752                                                                                    box, 
     753                                                                                        tData.mPvs, 
     754                                                                                        axis, 
     755                                                                                        nPosition[axis]); 
     756                        } 
     757 
    767758                        if (bestAxis == -1) 
    768759                        { 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h

    r480 r481  
    399399                                                                  const AxisAlignedBox3 &box, 
    400400                                                                  const int pvsSize, 
    401                                                                   int &axis, 
     401                                                                  const int &axis, 
    402402                                                                  float &position); 
    403403 
Note: See TracChangeset for help on using the changeset viewer.