Changeset 664


Ignore:
Timestamp:
02/27/06 18:39:47 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env

    r662 r664  
    236236                clipPlaneAxis 1 
    237237        } 
     238 
     239        evaluateViewCells true 
    238240         
    239241        Evaluation { 
     
    241243                samples 2000000 
    242244        } 
     245 
    243246#       filename ../data/atlanta/atlanta_viewcells_large.x3d 
    244247#       filename ../data/vienna/viewcells-25-sel.x3d 
     
    322325        maxTotalMemory  50 
    323326        maxStaticMemory 50 
     327         
     328        simulateOctree false 
    324329         
    325330        subdivisionStats ../subDivisionStats.log 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r663 r664  
    12011201        RegisterOption("ViewCells.type", 
    12021202                        optString, 
    1203                         "view_cells_type", 
     1203                        "view_cells_type=", 
    12041204                        "vspBspTree"); 
    12051205 
    12061206        RegisterOption("ViewCells.samplingType", 
    12071207                        optString, 
    1208                         "view_cells_sampling_type", 
     1208                        "view_cells_sampling_type=", 
    12091209                        "box"); 
    12101210 
     
    12141214                                        "viewCellsStats.log"); 
    12151215 
    1216         RegisterOption("ViewCells.PostProcess.statsPrefix", 
     1216        RegisterOption("ViewCells.Evaluation.statsPrefix", 
    12171217                                        optString, 
    1218                                         "view_cells_stats_prefix=", 
     1218                                        "view_cells_evaluation_stats_prefix=", 
    12191219                                        "viewCells"); 
    12201220         
    12211221        RegisterOption("ViewCells.active", 
    12221222                                        optInt, 
     1223                                        "view_cells_active=", 
    12231224                                        "1000"); 
    12241225 
     
    12281229                                        "5000000"); 
    12291230 
    1230  
    12311231        RegisterOption("ViewCells.Construction.samplesPerPass", 
    12321232                                        optInt, 
     
    12461246        RegisterOption("ViewCells.loadFromFile", 
    12471247                                        optBool, 
    1248                                         "view_cells_load_from_file", 
     1248                                        "view_cells_load_from_file=", 
    12491249                                        "false"); 
    12501250 
    12511251        RegisterOption("ViewCells.PostProcess.refine", 
    12521252                                        optBool, 
    1253                                         "view_cells_refine", 
     1253                                        "view_cells_refine=", 
    12541254                                        "false"); 
    1255  
    12561255 
    12571256        RegisterOption("ViewCells.PostProcess.compress", 
    12581257                                        optBool, 
    1259                                         "view_cells_compress", 
     1258                                        "view_cells_post_process_compress=", 
    12601259                                        "false"); 
    12611260 
     
    12701269                                        "300000"); 
    12711270 
    1272  
    12731271        RegisterOption("ViewCells.exportToFile", 
    12741272                                        optBool, 
    12751273                                        "view_cells_export_to_file", 
     1274                                        "false"); 
     1275 
     1276        RegisterOption("ViewCells.evaluateViewCells", 
     1277                                        optBool, 
     1278                                        "view_cells_evaluate_view_cells=", 
    12761279                                        "false"); 
    12771280 
     
    19831986        RegisterOption("VspBspTree.Factor.balancedRays", optFloat, "-vsp_bsp_factor_balanced_rays=", "1.0"); 
    19841987        RegisterOption("VspBspTree.Factor.pvs", optFloat, "-vsp_bsp_factor_pvs=", "1.0"); 
    1985  
    1986  
     1988         
    19871989        RegisterOption("VspBspTree.Construction.renderCostWeight", 
    19881990                        optFloat, 
     
    19982000                optBool,  
    19992001                "vsp_bsp_simulate_octree=",  
     2002                "false"); 
     2003 
     2004        RegisterOption("VspBspTree.breathFirstSplits", 
     2005                optBool, 
     2006                "-vsp_bsp_breath_first_splits=", 
     2007                "false"); 
     2008 
     2009        RegisterOption("VspBspTree.useRandomAxis", 
     2010                optBool, 
     2011                "-vsp_bsp_use_random_axis=", 
    20002012                "false"); 
    20012013 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r659 r664  
    283283        else 
    284284        { 
    285                 cerr<<"Wrong view cells type" << name << endl; 
     285                cerr << "Wrong view cells type " << name << "!!!" << endl; 
    286286                exit(1); 
    287287        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp

    r660 r664  
    411411                        ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 
    412412                        ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 
     413 
    413414                        for (it = interior->mChildren.begin(); it != it_end; ++ it) 
     415                        { 
    414416                                tstack.push(*it); 
     417                        } 
    415418                         
    416419                } 
     
    16331636 
    16341637void ViewCellsTree::PropagatePvs(ViewCell *vc) 
    1635 { 
     1638{        
     1639        ViewCell *viewCell = vc; 
     1640 
    16361641        // propagate pvs up 
    1637         while (vc->GetParent()) 
    1638         { 
    1639                 vc->GetParent()->GetPvs().Merge(vc->GetPvs()); 
    1640                 vc = vc->GetParent(); 
     1642        while (viewCell->GetParent()) 
     1643        { 
     1644                viewCell->GetParent()->GetPvs().Merge(vc->GetPvs()); 
     1645                viewCell = viewCell->GetParent(); 
    16411646        } 
    16421647 
     
    16611666                { 
    16621667                        ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(viewCell); 
     1668 
    16631669                        ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 
    16641670 
     
    16771683  tqueue.push(mRoot); 
    16781684  mRoot->SetColor(RandomColor(0.3f, 1.0f)); 
     1685 
    16791686  while (!tqueue.empty()) 
    16801687        { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h

    r660 r664  
    261261public: 
    262262 
    263         ViewCellLeaf<T>(): mLeaf(NULL) {} 
     263        ViewCellLeaf<T>(): mLeaf(NULL) { SetActive(); } 
    264264        ViewCellLeaf<T>(Mesh *mesh): 
    265                 ViewCell(mesh), mLeaf(NULL) {} 
     265                ViewCell(mesh), mLeaf(NULL) { SetActive(); } 
    266266 
    267267         
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r663 r664  
    4545        environment->GetBoolValue("ViewCells.Visualization.exportGeometry", mExportGeometry); 
    4646        environment->GetFloatValue("ViewCells.maxPvsRatio", mMaxPvsRatio); 
     47         
    4748        bool emptyViewCells = false; 
    4849        environment->GetBoolValue("ViewCells.pruneEmptyViewCells", emptyViewCells); 
     50        mMinPvsSize = emptyViewCells ? 1 : 0; 
     51 
    4952        environment->GetBoolValue("ViewCells.processOnlyValidViewCells", mOnlyValidViewCells); 
    5053 
     
    5861        environment->GetBoolValue("ViewCells.exportToFile", mExportViewCells); 
    5962         
    60          
    6163        environment->GetIntValue("ViewCells.active", mNumActiveViewCells); 
    6264        environment->GetBoolValue("ViewCells.PostProcess.compress", mCompressViewCells); 
    6365        environment->GetBoolValue("ViewCells.Visualization.useClipPlane", mUseClipPlaneForViz); 
    64  
    6566        environment->GetBoolValue("ViewCells.PostProcess.merge", mMergeViewCells); 
    66  
    67         char samplingBuf[50]; 
    68         environment->GetStringValue("ViewCells.samplingType", samplingBuf); 
    69          
    70         if (strcmp(samplingBuf, "box") == 0) 
     67        environment->GetBoolValue("ViewCells.evaluateViewCells", mEvaluateViewCells); 
     68 
     69        char buf[100]; 
     70        environment->GetStringValue("ViewCells.samplingType", buf); 
     71 
     72         
     73        if (strcmp(buf, "box") == 0) 
    7174                mSamplingType = Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 
    72         else if (strcmp(samplingBuf, "directional") == 0) 
     75        else if (strcmp(buf, "directional") == 0) 
    7376                mSamplingType = Preprocessor::DIRECTION_BASED_DISTRIBUTION; 
    7477 
    7578#if 0 
    76  
    77                 char viewCellsStatsLog[100]; 
    78                 environment->GetStringValue("ViewCells.stats", viewCellsStats); 
    79                 mViewCellsStats.open(viewCellsStatsLog); 
     79        environment->GetStringValue("ViewCells.stats", buf); 
     80        mViewCellsStats.open(buf); 
    8081#endif 
    8182 
    82         mMinPvsSize = emptyViewCells ? 1 : 0; 
    83  
    84         char buf[50]; 
    8583        environment->GetStringValue("ViewCells.Visualization.colorCode", buf); 
    8684 
     
    9492                mColorCode = 0; 
    9593 
    96         Debug << "colorCode: " << mColorCode << endl; 
     94 
     95        Debug << "***********View Cells options ****************" << endl; 
     96        Debug << "color code: " << mColorCode << endl; 
     97 
     98        Debug << "export rays: " << mExportRays << endl; 
     99        Debug << "export geometry: " << mExportGeometry << endl; 
     100        Debug << "max pvs ratio: " << mMaxPvsRatio << endl; 
     101         
     102        Debug << "prune empty view cells: " << emptyViewCells << endl; 
     103         
     104        Debug << "process only valid view cells: " << mOnlyValidViewCells << endl; 
     105        Debug << "construction samples: " << mConstructionSamples << endl; 
     106        Debug << "post process samples: " << mPostProcessSamples << endl; 
     107        Debug << "post process use rays for merge: " << mUseRaysForMerge << endl; 
     108        Debug << "visualization samples: " << mVisualizationSamples << endl; 
     109        Debug << "construction samples per pass: " << mSamplesPerPass << endl; 
     110        Debug << "export to file: " << mExportViewCells << endl; 
     111         
     112        Debug << "active: " << mNumActiveViewCells << endl; 
     113        Debug << "post process compress: " << mCompressViewCells << endl; 
     114        Debug << "visualization use clipPlane: " << mUseClipPlaneForViz << endl;  
     115        Debug << "post process merge: " << mMergeViewCells << endl; 
     116        Debug << "evaluate view cells: " << mEvaluateViewCells << endl; 
     117        Debug << "sampling type: " << mSamplingType << endl; 
     118 
     119        Debug << endl; 
    97120} 
    98121 
     
    213236        const int n = mConstructionSamples; //+initialSamples; 
    214237 
    215         bool dirSamples = false; 
     238        bool dirSamples = mSamplingType; 
    216239 
    217240        while (numSamples < n) 
     
    298321        disposeRays(visualizationSamples, outRays); 
    299322 
     323        if (mEvaluateViewCells) 
     324        { 
     325                Debug << "Evaluatating view cells!!!" << endl; 
     326        EvalViewCellPartition(preprocessor); 
     327        } 
     328        else 
     329                Debug << "No evaluation!!" << endl; 
     330 
    300331        return numSamples; 
    301332} 
    302333 
    303334 
    304 void ViewCellsManager::EvalViewCellPartition() 
     335void ViewCellsManager::EvalViewCellPartition(Preprocessor *preprocessor) 
    305336{ 
    306337        int samplesPerPass; 
     
    308339        int castSamples = 0; 
    309340 
     341        char s[64];  
     342 
    310343        environment->GetIntValue("ViewCells.Evaluation.samplesPerPass", samplesPerPass); 
    311344        environment->GetIntValue("ViewCells.Evaluation.samples", numSamples); 
    312345 
    313         Debug << "view cells evaluation samples per pass: " << samplesPerPass << endl; 
    314         Debug << "view cells evaluation samples: " << numSamples << endl; 
     346        char statsPrefix[100]; 
     347        environment->GetStringValue("ViewCells.Evaluation.statsPrefix", statsPrefix); 
     348 
     349        Debug << "view cell evaluation samples per pass: " << samplesPerPass << endl; 
     350        Debug << "view cell evaluation samples: " << numSamples << endl; 
     351        Debug << "view cell stats prefix: " << statsPrefix << endl; 
     352 
     353        //VssRayContainer outRays; 
     354 
     355        int dirSamples = mSamplingType; 
     356 
     357        if (0) 
     358                mViewCellsTree->ResetPvs(); 
     359 
     360        cout << "Evaluating view cell partition" << endl; 
     361 
     362        ViewCellContainer leaves; 
     363        mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 
    315364 
    316365        while (castSamples < numSamples) 
    317366        { 
    318  
    319         } 
    320         //char s[64]; sprintf(s, "bsp-pvs%04d.x3d", i); 
     367                VssRayContainer evaluationSamples; 
     368 
     369                const int samplingType =  
     370                        dirSamples ?  
     371                                                Preprocessor::DIRECTION_BASED_DISTRIBUTION : 
     372                                                Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 
     373 
     374                //-- construction rays => we use uniform samples for this 
     375                CastPassSamples(samplesPerPass, samplingType, evaluationSamples); 
     376                 
     377                castSamples += samplesPerPass; 
     378 
     379                cout << "casting " << (int)evaluationSamples.size() << " samples " << endl; 
     380 
     381                ComputeSampleContributions(evaluationSamples, true, false); 
     382 
     383                cout << "compute new statistics ... "; 
     384 
     385                ViewCellContainer::const_iterator it, it_end = leaves.end(); 
     386 
     387                for (it = leaves.begin(); it != it_end; ++ it) 
     388                { 
     389                        mViewCellsTree->PropagatePvs(*it); 
     390                } 
     391 
     392                // output stats 
     393                sprintf(s, "Stats-%09d-eval.log", castSamples); 
     394                string fileName = string(statsPrefix) + string(s); 
     395 
     396                mViewCellsTree->ExportStats(fileName); 
     397 
     398                cout << "finished" << endl; 
     399         
     400                disposeRays(evaluationSamples, NULL); 
     401        } 
    321402} 
    322403 
     
    446527 
    447528  float sum = 0.0f; 
    448   for (it = rays.begin(); it != it_end; ++ it) { 
    449         sum += ComputeSampleContributions(*(*it), addRays, storeViewCells); 
    450         //ComputeSampleContributions(*(*it), addRays); 
    451         //      sum += (*it)->mPvsContribution; 
     529  for (it = rays.begin(); it != it_end; ++ it)  
     530  { 
     531          sum += ComputeSampleContributions(*(*it), addRays, storeViewCells); 
     532          //ComputeSampleContributions(*(*it), addRays); 
     533          //    sum += (*it)->mPvsContribution; 
    452534  } 
     535 
    453536  return sum; 
    454537} 
     
    885968 
    886969        CastLineSegment(origin, termination, viewcells); 
    887          
     970 
    888971        // copy viewcells memory efficiently 
    889972        //const bool storeViewcells = !addRays; 
     
    897980        ViewCellContainer::const_iterator it = viewcells.begin(); 
    898981 
    899  
    900   for (; it != viewcells.end(); ++it) { 
    901         ViewCell *viewcell = *it; 
    902         if (viewcell->GetValid()) { 
    903           // if ray not outside of view space 
    904           float contribution; 
    905           if (viewcell->GetPvs().GetSampleContribution(ray.mTerminationObject, 
    906                                                                                                    ray.mPdf, 
    907                                                                                                    contribution 
    908                                                                                                    )) 
    909                 ray.mPvsContribution++; 
    910           ray.mRelativePvsContribution += contribution; 
    911         } 
    912   } 
    913  
    914   if (addRays) 
    915         for (it = viewcells.begin(); it != viewcells.end(); ++it) { 
    916           ViewCell *viewcell = *it; 
    917           if (viewcell->GetValid()) { 
    918                 // if ray not outside of view space 
    919                 viewcell->GetPvs().AddSample(ray.mTerminationObject, ray.mPdf); 
    920           } 
     982        for (; it != viewcells.end(); ++ it)  
     983        { 
     984                ViewCell *viewcell = *it; 
     985                if (viewcell->GetValid())  
     986                { 
     987                        // if ray not outside of view space 
     988                        float contribution; 
     989                        if (viewcell->GetPvs().GetSampleContribution(ray.mTerminationObject, 
     990                                                                                                                 ray.mPdf, 
     991                                                                                                                 contribution)) 
     992                        { 
     993                                ++ ray.mPvsContribution; 
     994                                ray.mRelativePvsContribution += contribution; 
     995                        } 
     996                } 
     997        } 
     998 
     999         
     1000        if (addRays) 
     1001        { 
     1002                for (it = viewcells.begin(); it != viewcells.end(); ++ it)  
     1003                { 
     1004                        ViewCell *viewcell = *it; 
     1005             
     1006                        if (viewcell->GetValid())  
     1007                        { 
     1008                                // if ray not outside of view space 
     1009                                viewcell->GetPvs().AddSample(ray.mTerminationObject, ray.mPdf); 
     1010                        } 
     1011                } 
    9211012        } 
    9221013 
     
    24712562        } 
    24722563        else  
    2473         { 
    2474                 // we can use the view cells tree hierarchy to get the right set 
     2564        {       // we can use the view cells tree hierarchy to get the right set 
    24752565                mViewCellsTree->CollectBestViewCellSet(mViewCells, mNumActiveViewCells); 
    24762566        } 
     
    25092599 
    25102600        Debug << "samples used for vsp bsp subdivision: " << mInitialSamples  
    2511                   << " rays: " << (int)rays.size() << endl; 
     2601                  << ", actual rays: " << (int)rays.size() << endl; 
    25122602 
    25132603        GetRaySets(rays, mInitialSamples, constructionRays, &savedRays); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r660 r664  
    362362        /** Evaluates worth of current view cell hierarchy. 
    363363        */ 
    364         void EvalViewCellPartition(); 
     364        void EvalViewCellPartition(Preprocessor *preprocessor); 
    365365 
    366366protected: 
     
    478478 
    479479        bool mViewCellsFinished; 
     480 
     481        bool mEvaluateViewCells; 
    480482}; 
    481483 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp

    r660 r664  
    569569        else 
    570570        { 
    571                 cerr<<"Wrong view cells type" << name << endl; 
     571                cerr<<"Wrong view cells type " << name << "!!!" << endl; 
    572572                exit(1); 
    573573        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r663 r664  
    3737int VspBspTree::sFrontAndBackId = 0; 
    3838 
    39 bool VspBspTraversalData::sBreathFirstSplits = false; 
    4039 
    4140 
     
    130129        environment->GetBoolValue("VspBspTree.useSplitCostQueue", mUseSplitCostQueue); 
    131130        environment->GetBoolValue("VspBspTree.simulateOctree", mSimulateOctree); 
    132         environment->GetBoolValue("VspBspTree.breathFirstSplits", VspBspTraversalData::sBreathFirstSplits); 
     131        environment->GetBoolValue("VspBspTree.useRandomAxis", mUseRandomAxis); 
     132        environment->GetBoolValue("VspBspTree.breathFirstSplits", mBreathFirstSplits); 
    133133 
    134134        char subdivisionStatsLog[100]; 
     
    162162        Debug << "use split cost queue: " << mUseSplitCostQueue << endl; 
    163163        Debug << "subdivision stats log: " << subdivisionStatsLog << endl; 
    164          
     164        Debug << "use random axis: " << mUseRandomAxis << endl; 
     165        Debug << "breath first splits: " << mBreathFirstSplits << endl; 
     166 
    165167 
    166168        Debug << "Split plane strategy: "; 
     
    463465                                                          geom); 
    464466 
    465         tData.mPriority = mBreathFirstSplits ?  
    466                 (float)-frontData.mDepth : tData.mPvs * tData.mProbability; 
     467        EvalPriority(tData); 
     468         
    467469 
    468470        if (mSimulateOctree) 
     
    494496 
    495497        long startTime = GetTime();      
    496         int nLeaves = 0; 
    497         int nViewCells = 0; 
     498        int nLeaves = 500; 
     499        int nViewCells = 500; 
    498500 
    499501        // used for intermediate time measurements and progress 
     
    538540                } 
    539541 
    540                 if (mCreatedViewCells == nViewCells) 
     542                if (mCreatedViewCells >= nViewCells) 
    541543                { 
    542544                        nViewCells += 500; 
     
    575577                                                          geom); 
    576578 
    577         tData.mPriority = mBreathFirstSplits ?  
    578                 (float)-tData.mDepth : tData.mPvs * tData.mProbability; 
     579         
    579580 
    580581        // compute first split candidate 
     
    744745                        tBackData.mMaxCostMisses = maxCostMisses; 
    745746 
    746                         ComputePriority(tFrontData); 
    747                         ComputePriority(tBackData); 
     747                        EvalPriority(tFrontData); 
     748                        EvalPriority(tBackData); 
    748749 
    749750                        if (1) 
     
    864865                tFrontData.mMaxCostMisses = maxCostMisses; 
    865866                tBackData.mMaxCostMisses = maxCostMisses; 
    866                  
    867                 ComputePriority(tFrontData); 
    868                 ComputePriority(tBackData); 
    869  
    870                 frontData.mPriority = mBreathFirstSplits ?  
    871                 (float)-frontData.mDepth : frontData.mPvs * frontData.mProbability; 
    872         backData.mPriority = mBreathFirstSplits ?  
    873                 (float)-backData.mDepth : backData.mPvs * backData.mProbability; 
     867                         
    874868                if (1) 
    875869                { 
     
    951945 
    952946        return newNode; 
     947} 
     948 
     949 
     950void VspBspTree::EvalPriority(VspBspTraversalData &tData) const 
     951{ 
     952    tData.mPriority = mBreathFirstSplits ?  
     953                (float)-tData.mDepth : tData.mPvs * tData.mProbability; 
    953954} 
    954955 
     
    13561357        int sAxis = 0; 
    13571358 
    1358         bool useSpecialAxis = false; 
    1359  
    1360         if (mSimulateOctree) 
    1361         { 
     1359        bool useSpecialAxis = mOnlyDrivingAxis || mUseRandomAxis || mSimulateOctree; 
     1360 
     1361        // use some kind of specialised fixed axis 
     1362        if (mOnlyDrivingAxis) 
     1363                sAxis = box.Size().DrivingAxis(); 
     1364        else if (mUseRandomAxis) 
     1365                sAxis = Random(3); 
     1366        else if (mSimulateOctree) 
    13621367                sAxis = tData.mAxis; 
    1363                 useSpecialAxis = true; 
    1364         } 
    1365         else if (mUseRandomAxis) 
    1366         { 
    1367                 sAxis = Random(3); 
    1368                 useSpecialAxis = true; 
    1369         } 
    1370         else if (mOnlyDrivingAxis) 
    1371         { 
    1372                 sAxis = box.Size().DrivingAxis(); 
    1373                 useSpecialAxis = true; 
    1374         } 
     1368                 
    13751369 
    13761370        for (axis = 0; axis < 3; ++ axis) 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h

    r663 r664  
    6969                float mPriority; 
    7070 
    71                 static bool sBreathFirstSplits; 
    72  
     71                 
    7372                /** Returns average ray contribution. 
    7473                */ 
     
    8887                mGeometry(NULL), 
    8988                mMaxCostMisses(0),  
    90                 mIsKdNode(false) 
     89                mIsKdNode(false), 
     90                mPriority(0) 
    9191                {} 
    9292                 
     
    106106                mGeometry(geom), 
    107107                mMaxCostMisses(0), 
    108                 mIsKdNode(false) 
     108                mIsKdNode(false), 
     109                mPriority(0) 
    109110                {} 
    110111 
     
    128129                float GetCost() const 
    129130                { 
    130                         if (sBreathFirstSplits) 
    131                                 return mPvs * mProbability; 
    132                         else 
    133                                 return (float) (-mDepth); // for kd tree 
     131                        return mPriority; 
    134132                } 
    135133 
     
    388386                                                                   float &pBack) const; 
    389387 
     388        /** Evaluates candidate for splitting. 
     389        */ 
    390390        void EvalSplitCandidate(VspBspTraversalData &tData, VspBspSplitCandidate &splitData); 
     391 
     392        /** Computes priority of the traversal data and stores it in tData. 
     393        */ 
     394        void EvalPriority(VspBspTraversalData &tData) const; 
    391395 
    392396        float EvalRenderCostDecrease(const Plane3 &candidatePlane, 
     
    790794        bool mSimulateOctree; 
    791795 
    792         int mBreathFirstSplits; 
     796        /// if we should use breath first priority for the splits 
     797        bool mBreathFirstSplits; 
    793798 
    794799private: 
Note: See TracChangeset for help on using the changeset viewer.