Changeset 1357


Ignore:
Timestamp:
09/13/06 17:15:26 (18 years ago)
Author:
mattausch
Message:

implemented the global version of the bounding volume construction

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
3 edited

Legend:

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

    r1345 r1357  
    2424#define USE_FIXEDPOINT_T 0 
    2525 
    26 static float debugVol = 0; 
    27  
    28 int BvhNode::sMailId = 10000;//2147483647; 
     26int BvhNode::sMailId = 10000; //2147483647; 
    2927int BvhNode::sReservedMailboxes = 1; 
    3028 
     
    3230 
    3331 
     32/// sorting operator 
    3433inline static bool ilt(Intersectable *obj1, Intersectable *obj2) 
    3534{ 
     
    171170{ 
    172171        ReadEnvironment(); 
    173         mSubdivisionCandidates = new vector<SortableEntry>; 
     172        mSubdivisionCandidates = new SortableEntryContainer; 
    174173} 
    175174 
     
    228227                "BvHierarchy.Construction.renderCostDecreaseWeight", mRenderCostDecreaseWeight); 
    229228         
    230  
     229        Environment::GetSingleton()->GetBoolValue("BvHierarchy.useGlobalSort", mUseGlobalSorting); 
     230 
     231 
     232        /////////////////// 
    231233        //-- debug output 
    232  
    233234        Debug << "******* Bvh hierarchy options ******** " << endl; 
    234235    Debug << "max depth: " << mTermMaxDepth << endl; 
     
    245246        Debug << "use cost heuristics: " << mUseCostHeuristics << endl; 
    246247        Debug << "subdivision stats log: " << subdivisionStatsLog << endl; 
    247          
    248248        Debug << "split borders: " << mSplitBorder << endl; 
    249249        Debug << "render cost decrease weight: " << mRenderCostDecreaseWeight << endl; 
     250        Debug << "use global sort: " << mUseGlobalSorting << endl; 
    250251        Debug << endl; 
    251252} 
    252253 
    253254 
    254 void AssociateObjectsWithLeaf(BvhLeaf *leaf) 
     255static void AssociateObjectsWithLeaf(BvhLeaf *leaf) 
    255256{ 
    256257        ObjectContainer::const_iterator oit, oit_end = leaf->mObjects.end(); 
     
    274275         
    275276 
    276         //-- the front and back traversal data is filled with the new values 
     277        /////////////////////////////////////////////////////////////////// 
     278        //-- fill  front and back traversal data with the new values 
    277279 
    278280        frontData.mDepth = backData.mDepth = tData.mDepth + 1; 
     
    328330        frontData.mMaxCostMisses = sc.mMaxCostMisses; 
    329331        backData.mMaxCostMisses = sc.mMaxCostMisses; 
    330                  
    331         // assign positions of the iterators 
    332 #if 0 
    333         frontData.mObjectsStart = sc.mFrontObjectsStart; 
    334         frontData.mObjectsEnd = sc.mFrontObjectsEnd; 
    335          
    336         backData.mObjectsStart = sc.mBackObjectsStart; 
    337         backData.mObjectsEnd = sc.mBackObjectsEnd; 
    338 #endif 
     332         
     333        // assign the objects in sorted order 
     334        if (mUseGlobalSorting) 
     335        { 
     336                AssignSortedObjects(sc, frontData, backData); 
     337        } 
     338         
    339339        // return the new interior node 
    340340        return node; 
     
    388388                tBackData.mNode->SetSubdivisionCandidate(backCandidate); 
    389389 
    390                 Debug << "leaf: " << tFrontData.mNode << " setting f candidate: " << tFrontData.mNode->GetSubdivisionCandidate() << " type: " << tFrontData.mNode->GetSubdivisionCandidate()->Type() << endl; 
    391                 Debug << "leaf: " << tBackData.mNode << " setting b candidate: " << tBackData.mNode->GetSubdivisionCandidate() << " type: " << tBackData.mNode->GetSubdivisionCandidate()->Type() << endl; 
     390                Debug << "leaf: " << tFrontData.mNode << " setting f candidate: "  
     391                          << tFrontData.mNode->GetSubdivisionCandidate() << " type: "  
     392                          << tFrontData.mNode->GetSubdivisionCandidate()->Type() << endl; 
     393 
     394                Debug << "leaf: " << tBackData.mNode << " setting b candidate: "  
     395                          << tBackData.mNode->GetSubdivisionCandidate() << " type: "  
     396                          << tBackData.mNode->GetSubdivisionCandidate()->Type() << endl; 
    392397                 
    393398                tQueue.Push(frontCandidate); 
     
    443448        const float viewSpaceVol = mVspTree->GetBoundingBox().GetVolume(); 
    444449        const float oldProp = EvalViewCellsVolume(leaf->mObjects); 
    445         //const float oldProp2 = splitCandidate.mParentData.mProbability; Debug << "here8 " << (oldProp - oldProp2) / viewSpaceVol << "  " << oldProp  / viewSpaceVol << " " << oldProp2  / viewSpaceVol << endl; 
    446450 
    447451        const float oldRenderCost = oldProp * (float)leaf->mObjects.size() / viewSpaceVol; 
     
    568572                                                                                        ObjectContainer &objectsBack) 
    569573{ 
    570         SortSubdivisionCandidates(tData.mNode->mObjects, &mSubdivisionCandidates, axis); 
    571          
    572         vector<SortableEntry>::const_iterator cit, cit_end = mSubdivisionCandidates->end(); 
     574        PrepareLocalSubdivisionCandidates(tData, axis); 
     575         
     576        SortableEntryContainer::const_iterator cit, cit_end = mSubdivisionCandidates->end(); 
    573577 
    574578        int i = 0; 
     
    603607                                                   ObjectContainer &objectsBack) 
    604608{ 
    605         SortSubdivisionCandidates(tData.mNode->mObjects, &mSubdivisionCandidates, axis); 
     609        PrepareLocalSubdivisionCandidates(tData, axis); 
    606610   
    607611        // go through the lists, count the number of objects left and right 
     
    624628        float maxBorder = minBox; 
    625629 
    626         vector<SortableEntry>::const_iterator currentPos = 
     630        SortableEntryContainer::const_iterator currentPos = 
    627631                mSubdivisionCandidates->begin(); 
    628632 
    629         vector<SortableEntry>::reverse_iterator rcit =  
     633        SortableEntryContainer::reverse_iterator rcit =  
    630634                mSubdivisionCandidates->rbegin(), rcit_end = mSubdivisionCandidates->rend(); 
    631635                 
     
    645649        vector<float>::const_iterator bit = bordersRight.begin(); 
    646650 
    647         vector<SortableEntry>::const_iterator cit, cit_end = mSubdivisionCandidates->end(); 
     651        SortableEntryContainer::const_iterator cit, cit_end = mSubdivisionCandidates->end(); 
    648652        for (cit = mSubdivisionCandidates->begin(); cit != cit_end; ++ cit, ++ bit)  
    649653        { 
     
    750754                                                                                   ObjectContainer &objectsBack) 
    751755{ 
     756        //////////////////////////////////////////////////////////////// 
     757        // go through the lists, count the number of objects left and right 
     758        // and evaluate the cost funcion 
     759 
    752760        // prepare the heuristics by setting mailboxes and counters. 
    753761        const float totalVol = PrepareHeuristics(tData, axis); 
    754  
    755         // go through the lists, count the number of objects left and right 
    756         // and evaluate the cost funcion 
    757  
     762         
    758763        // local helper variables 
    759764        float volLeft = 0; 
    760765        float volRight = totalVol; 
    761  
    762766        int nObjectsLeft = 0; 
    763  
    764767        const int nTotalObjects = (int)tData.mNode->mObjects.size(); 
    765768        const float viewSpaceVol = mVspTree->GetBoundingBox().GetVolume(); 
    766769 
    767         vector<SortableEntry>::const_iterator currentPos = 
    768                 mSubdivisionCandidates->begin(); 
     770        SortableEntryContainer::const_iterator backObjectsStart = mSubdivisionCandidates->begin(); 
    769771 
    770772        ///////////////////////////////// 
    771         // the parameters for the current optimum 
     773        //-- the parameters for the current optimum 
    772774 
    773775        float volBack = volLeft; 
     
    782784        const bool printStats = 
    783785                PrepareOutput(axis, mBvhStats.Leaves(), sumStats, vollStats, volrStats); 
    784          
    785786#endif 
    786787 
    787         ///////////////////////////// 
    788         // the sweep heuristics 
    789          
     788        /////////////////////////////////////////////////// 
     789        //-- the sweep heuristics 
    790790        //-- traverse through events and find best split plane 
    791791 
    792         vector<SortableEntry>::const_iterator cit, cit_end = mSubdivisionCandidates->end(); 
     792        SortableEntryContainer::const_iterator cit, cit_end = cit_end = mSubdivisionCandidates->end(); 
    793793 
    794794        for (cit = mSubdivisionCandidates->begin(); cit != cit_end; ++ cit) 
     
    802802 
    803803                ++ nObjectsLeft; 
    804                  
    805804                const int nObjectsRight = nTotalObjects - nObjectsLeft; 
    806805 
     
    811810#ifdef _DEBUG 
    812811                if (printStats) 
     812                { 
    813813                        PrintHeuristics(nObjectsRight, sum, volLeft, volRight, viewSpaceVol, 
    814814                                                        sumStats, vollStats, volrStats); 
     815                } 
    815816#endif 
    816817 
     
    823824 
    824825                        // objects belongs to left side now 
    825                         for (; currentPos != (cit + 1); ++ currentPos); 
     826                        for (; backObjectsStart != (cit + 1); ++ backObjectsStart); 
    826827                } 
    827828        } 
    828829 
     830        //////////////////////////////////////////// 
    829831        //-- assign object to front and back volume 
    830832 
    831833        // belongs to back bv 
    832         for (cit = mSubdivisionCandidates->begin(); cit != currentPos; ++ cit) 
     834        for (cit = mSubdivisionCandidates->begin(); cit != backObjectsStart; ++ cit) 
     835        { 
    833836                objectsBack.push_back((*cit).mObject); 
    834          
     837        } 
    835838        // belongs to front bv 
    836         for (cit = currentPos; cit != cit_end; ++ cit) 
     839        for (cit = backObjectsStart; cit != cit_end; ++ cit) 
     840        { 
    837841                objectsFront.push_back((*cit).mObject); 
    838  
     842        } 
     843 
     844        // render cost of the old parent 
    839845        const float oldRenderCost = (float)nTotalObjects * totalVol + Limits::Small; 
    840846        // the relative cost ratio 
     
    853859 
    854860 
    855 void BvHierarchy::SortSubdivisionCandidates(const ObjectContainer &objects, 
    856                                                                                         vector<SortableEntry> **subdivisionCandidates, 
    857                                                                                         const int axis)                                                                                  
     861void BvHierarchy::PrepareLocalSubdivisionCandidates(const BvhTraversalData &tData, 
     862                                                                                                        const int axis)                                                                                  
     863{ 
     864        //-- insert object queries 
     865        ObjectContainer *objects; 
     866 
     867        if (!mUseGlobalSorting) 
     868                objects = &tData.mNode->mObjects; 
     869        else 
     870                objects = tData.mSortedObjects[axis]; 
     871         
     872        CreateLocalSubdivisionCandidates(*objects, &mSubdivisionCandidates, mUseGlobalSorting, axis); 
     873} 
     874 
     875 
     876void BvHierarchy::CreateLocalSubdivisionCandidates(const ObjectContainer &objects,  
     877                                                                                                  SortableEntryContainer **subdivisionCandidates,  
     878                                                                                                  const bool sort, 
     879                                                                                                  const int axis) 
    858880{ 
    859881        (*subdivisionCandidates)->clear(); 
    860882 
    861         // compute requested size 
     883        // compute requested size and look if subdivision candidate has to be recomputed 
    862884        const int requestedSize = (int)objects.size() * 2; 
    863885         
     
    866888                requestedSize < (int)((*subdivisionCandidates)->capacity() / 10) ) 
    867889        { 
    868         delete *subdivisionCandidates; 
    869                 *subdivisionCandidates = new vector<SortableEntry>; 
     890        delete (*subdivisionCandidates); 
     891                (*subdivisionCandidates) = new SortableEntryContainer; 
    870892        } 
    871893 
    872894        (*subdivisionCandidates)->reserve(requestedSize); 
    873895 
    874         //-- insert object queries 
    875         //-- These queries can induce a change in pvs size. 
    876         //-- Note that they cannot induce a change in view cell volume, as 
    877         //-- there is no ray associated with these events!! 
    878  
    879896        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    880897 
    881898        for (oit = objects.begin(); oit < oit_end; ++ oit) 
    882899        { 
    883                 Intersectable *obj = *oit; 
    884                  
    885900                Intersectable *object = *oit; 
    886901                const AxisAlignedBox3 &box = object->GetBox(); 
     
    890905        } 
    891906 
    892         stable_sort((*subdivisionCandidates)->begin(), (*subdivisionCandidates)->end()); 
     907        if (sort) 
     908        { 
     909                stable_sort((*subdivisionCandidates)->begin(), (*subdivisionCandidates)->end()); 
     910        } 
    893911} 
    894912 
     
    905923        float vol = 0; 
    906924 
    907         // sort so we can use a sweep from right to left 
    908         SortSubdivisionCandidates(tData.mNode->mObjects, &mSubdivisionCandidates, axis); 
    909  
     925    // sort so we can use a sweep from right to left 
     926        PrepareLocalSubdivisionCandidates(tData, axis); 
     927         
    910928        // collect and mark the view cells as belonging to front pvs 
    911929        ViewCellContainer viewCells; 
     
    939957        CollectViewCells(obj, viewCells, useMailboxing); 
    940958 
    941         /// classify view cells and compute volume contri accordingly 
    942         /// possible view cell classifications: 
    943         /// view cell mailed => view cell can be seen from left child node 
    944         /// view cell counter > 0 view cell can be seen from right child node 
    945         /// combined: view cell volume belongs to both nodes 
     959        // classify view cells and compute volume contri accordingly 
     960        // possible view cell classifications: 
     961        // view cell mailed => view cell can be seen from left child node 
     962        // view cell counter > 0 view cell can be seen from right child node 
     963        // combined: view cell volume belongs to both nodes 
    946964        ViewCellContainer::const_iterator vit, vit_end = viewCells.end(); 
    947965         
     
    956974                { 
    957975                        viewCell->Mail(); 
    958  
    959976                        // we now see view cell from both nodes  
    960977                        // => add volume to left node 
     
    964981                // last reference into the right node 
    965982                if (-- viewCell->mCounter == 0) 
    966                 { 
     983                {        
    967984                        // view cell was previously seen from both nodes  => 
    968985                        // remove volume from right node 
     
    10051022        } 
    10061023         
    1007         // -- evaluate split cost for all three axis 
     1024        //////////////////////////////////////////// 
     1025        //-- evaluate split cost for all three axis 
    10081026         
    10091027        for (int axis = 0; axis < 3; ++ axis) 
     
    10421060        } 
    10431061 
     1062        ///////////////////////////////////// 
    10441063        //-- assign values 
    10451064 
     
    11291148        //-- pvs rendering heuristics 
    11301149        const float newRenderCost = nObjectsFront * pFront + nObjectsBack * pBack; 
    1131         /* 
     1150 
     1151#ifdef _DEBUG 
    11321152        const float viewSpaceVol = mVspTree->GetBoundingBox().GetVolume(); 
    11331153        Debug << "\nbvh render cost\n"  
    11341154                  << "back p: " << pBack / viewSpaceVol << " front p " << pFront / viewSpaceVol << endl 
    11351155                  << "new rc: " << newRenderCost / viewSpaceVol << endl;*/ 
     1156#endif 
    11361157 
    11371158        return newRenderCost; 
     
    14481469} 
    14491470 
     1471 
    14501472void BvHierarchy::CreateRoot(const ObjectContainer &objects) 
    14511473{ 
     
    14541476        BvhLeaf *bvhleaf = new BvhLeaf(box, NULL, (int)objects.size()); 
    14551477        bvhleaf->mObjects = objects; 
    1456  
    14571478        mRoot = bvhleaf; 
    14581479 
     
    14651486                                                                                                           const ObjectContainer &objects) 
    14661487{ 
     1488        /////////////////////////////////////////////////////////////// 
     1489        // note matt: we assume that we have objects sorted by their id 
     1490 
    14671491        mBvhStats.Reset(); 
    14681492        mBvhStats.Start(); 
    14691493        mBvhStats.nodes = 1; 
    1470  
    1471         for (int i = 0; i < 3; ++ i) 
    1472         { 
    1473                 mGlobalSubdivisionCandidates[i] = new vector<SortableEntry>(); 
    1474                 SortSubdivisionCandidates(objects, &mGlobalSubdivisionCandidates[i], i); 
    1475         } 
    1476  
    1477         // note matt: we assume that we have objects sorted by their id 
    14781494 
    14791495        // store pointer to this tree 
     
    15021518        BvhTraversalData oData(bvhleaf, 0, mBoundingBox, prop); 
    15031519 
     1520        // create sorted object lists for the first data 
     1521        if (mUseGlobalSorting) 
     1522        { 
     1523                CreateInitialSortedObjectList(oData); 
     1524        } 
     1525         
     1526 
     1527        //////////////////////////////////////////////////// 
    15041528        //-- add first candidate for object space partition      
     1529 
    15051530        BvhSubdivisionCandidate *oSubdivisionCandidate =  
    15061531                new BvhSubdivisionCandidate(oData); 
     
    15301555 
    15311556 
     1557void BvHierarchy::CreateInitialSortedObjectList(BvhTraversalData &tData) 
     1558{ 
     1559        SortableEntryContainer *sortedObjects = new SortableEntryContainer(); 
     1560 
     1561        // we sort the objects as a preprocess so they don't have 
     1562        // to be sorted for each split 
     1563        for (int i = 0; i < 3; ++ i) 
     1564        { 
     1565                CreateLocalSubdivisionCandidates(tData.mNode->mObjects, &sortedObjects, true, i); 
     1566                         
     1567                tData.mSortedObjects[i] = new ObjectContainer(); 
     1568                tData.mSortedObjects[i]->reserve((int)sortedObjects->size()); 
     1569 
     1570                SortableEntryContainer::const_iterator oit, oit_end = sortedObjects->end(); 
     1571                for (oit = sortedObjects->begin(); oit != oit_end; ++ oit) 
     1572                { 
     1573                        tData.mSortedObjects[i]->push_back((*oit).mObject); 
     1574                } 
     1575        } 
     1576 
     1577        delete sortedObjects; 
     1578} 
     1579 
     1580 
     1581void BvHierarchy::AssignSortedObjects(const BvhSubdivisionCandidate &sc, 
     1582                                                                          BvhTraversalData &frontData, 
     1583                                                                          BvhTraversalData &backData) 
     1584{ 
     1585        Intersectable::NewMail(); 
     1586 
     1587        // we sorted the objects as a preprocess so they don't have 
     1588        // to be sorted for each split 
     1589        ObjectContainer::const_iterator fit, fit_end = sc.mFrontObjects.end(); 
     1590 
     1591        for (fit = sc.mFrontObjects.begin(); fit != fit_end; ++ fit) 
     1592        { 
     1593                (*fit)->Mail(); 
     1594        } 
     1595 
     1596        for (int i = 0; i < 3; ++ i) 
     1597        { 
     1598                frontData.mSortedObjects[i]->reserve((int)sc.mFrontObjects.size()); 
     1599                backData.mSortedObjects[i]->reserve((int)sc.mFrontObjects.size()); 
     1600 
     1601                ObjectContainer::const_iterator oit, oit_end = sc.mParentData.mNode->mObjects.end(); 
     1602 
     1603                for (oit = sc.mParentData.mNode->mObjects.begin(); oit != oit_end; ++ oit) 
     1604                { 
     1605                        if ((*oit)->Mailed()) 
     1606                        { 
     1607                                frontData.mSortedObjects[i]->push_back(*oit); 
     1608                        } 
     1609                        else 
     1610                        { 
     1611                                backData.mSortedObjects[i]->push_back(*oit); 
     1612                        } 
     1613                } 
     1614        } 
     1615} 
     1616 
     1617 
    15321618void BvhStatistics::Print(ostream &app) const 
    15331619{ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h

    r1345 r1357  
    3535class VspTree; 
    3636class ViewCellsContainer; 
    37 //class BvhSubdivisionCandidate; 
    3837 
    3938 
     
    149148        /** The bounding box specifies the node extent. 
    150149        */ 
     150        inline  
    151151        AxisAlignedBox3 GetBoundingBox() const 
    152152        { return mBoundingBox; } 
    153153 
    154154 
     155        inline  
    155156        void SetBoundingBox(const AxisAlignedBox3 &boundingBox)  
    156157        { mBoundingBox = boundingBox; } 
     
    298299                mMaxCostMisses(0),  
    299300                mAxis(0) 
    300                 //mObjectsStart(0), 
    301                 //mObjectsEnd(0) 
    302                 {} 
     301                { 
     302                        mSortedObjects[0] = mSortedObjects[1] = mSortedObjects[2] = NULL; 
     303                } 
    303304                 
    304305                BvhTraversalData(BvhLeaf *node,  
     
    312313                mMaxCostMisses(0), 
    313314                mAxis(0) 
    314                 //mObjectsStart(0) 
    315                 //mObjectsEnd(0) 
    316                 {} 
    317  
    318                 /// deletes contents and sets them to NULL 
     315                { 
     316                        mSortedObjects[0] = mSortedObjects[1] = mSortedObjects[2] = NULL; 
     317                } 
     318 
     319                /** Deletes contents and sets them to NULL. 
     320                */ 
    319321                void Clear() 
    320322                { 
    321323                        DEL_PTR(mNode); 
     324                        /*DEL_PTR(mSortedObjects[0]); 
     325                        DEL_PTR(mSortedObjects[1]); 
     326                        DEL_PTR(mSortedObjects[2]);*/ 
    322327                } 
    323328 
     
    334339                /// current axis 
    335340                int mAxis; 
    336                 /// start of objects 
    337                 SortableEntryContainer::const_iterator mObjectsStart; 
    338                 /// end of objects 
    339                 SortableEntryContainer::const_iterator mObjectsEnd; 
     341                /// the sorted objects for the three dimensions 
     342                ObjectContainer *mSortedObjects[3];              
    340343    }; 
    341344 
    342         /** Candidate for a view space split. 
     345 
     346        /** Candidate for a object space split. 
    343347        */ 
    344348        class BvhSubdivisionCandidate: public SubdivisionCandidate 
     
    618622 
    619623         
    620         /** Sorts split candidates for cost heuristics using axis aligned splits. 
     624        /** Prepare split candidates for cost heuristics using axis aligned splits. 
    621625                @param node the current node 
    622626                @param axis the current split axis 
    623627        */ 
    624         static void SortSubdivisionCandidates( 
    625                 const ObjectContainer &objects, 
    626                 vector<SortableEntry> **subdivisionCandidates, 
     628        void PrepareLocalSubdivisionCandidates( 
     629                const BvhTraversalData &tData, 
    627630                const int axis); 
    628631 
    629         /** Computes best cost for axis aligned planes. 
     632        static void CreateLocalSubdivisionCandidates( 
     633                const ObjectContainer &objects,  
     634                SortableEntryContainer **subdivisionCandidates, 
     635                const bool sort, 
     636                const int axis); 
     637 
     638        /** Computes object partition with the best cost according to the heurisics. 
     639                @param tData the traversal data 
     640                @param axis the split axis 
     641                @param objectsFront the objects in the front child bv 
     642                @param objectsBack the objects in the back child bv 
     643                @param backObjectsStart the iterator marking the position where the back objects begin 
     644 
     645                @returns relative cost (relative to parent cost) 
    630646        */ 
    631647        float EvalLocalCostHeuristics( 
     
    633649                const int axis, 
    634650                ObjectContainer &objectsFront, 
    635                 ObjectContainer &objectsFBack); 
     651                ObjectContainer &objectsBack); 
    636652 
    637653        /** Evaluates the contribution to the front and back volume 
     
    708724        float EvalViewCellsVolume(const ObjectContainer &objects) const; 
    709725 
     726        void CreateInitialSortedObjectList(BvhTraversalData &tData); 
     727 
     728        void AssignSortedObjects( 
     729                const BvhSubdivisionCandidate &sc, 
     730                BvhTraversalData &frontData, 
     731                BvhTraversalData &backData); 
     732 
    710733 
    711734protected: 
     
    735758 
    736759 
    737         //-- local termination 
     760        //////////////////////////////// 
     761        //-- local termination criteria 
    738762 
    739763        /// maximal possible depth 
     
    751775 
    752776 
    753         //-- global criteria 
     777        //////////////////////////////////// 
     778        //-- global termination criteria 
    754779 
    755780        float mTermMinGlobalCostRatio; 
     
    765790 
    766791 
     792        //////////////////////////////////////// 
    767793        //-- split heuristics based parameters 
    768794         
     
    772798        /// if only driving axis should be used for split 
    773799        bool mOnlyDrivingAxis; 
    774          
    775800        /// current time stamp (used for keeping split history) 
    776801        int mTimeStamp; 
    777802        // if rays should be stored in leaves 
    778803        bool mStoreRays; 
    779  
    780         /// epsilon for geometric comparisons 
    781         float mEpsilon; 
    782  
    783         /// subdivision stats output file 
     804        // subdivision stats output file 
    784805        ofstream  mSubdivisionStats; 
    785806        /// keeps track of cost during subdivision 
     
    789810        /// number of currenly generated view cells 
    790811        int mCreatedLeaves; 
    791  
    792812        /// represents min and max band for sweep 
    793813        float mSplitBorder; 
    794  
    795814        /// weight between render cost decrease and node render cost 
    796815        float mRenderCostDecreaseWeight; 
    797  
    798816        /// stores the kd node intersectables used for pvs 
    799817        BvhIntersectableMap mBvhIntersectables; 
    800818 
     819        bool mUseGlobalSorting; 
    801820}; 
    802821 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h

    r1314 r1357  
    256256 
    257257protected: 
    258  
     258        /// bounding box for this interior node: should we really store this? 
    259259        AxisAlignedBox3 mBoundingBox; 
    260260 
Note: See TracChangeset for help on using the changeset viewer.