Changeset 1713


Ignore:
Timestamp:
11/06/06 18:48:22 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
8 edited

Legend:

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

    r1709 r1713  
    822822#endif 
    823823 
     824#if 1 
    824825 
    825826float BvHierarchy::EvalSah(const BvhTraversalData &tData, 
     
    930931                const bool noValidSplit = ((objectsLeft <= Limits::Small) || (objectsRight <= Limits::Small)); 
    931932 
     933                const float sum =  noValidSplit ? 1e25 : objectsLeft * al + objectsRight * ar; 
     934       
     935                /*cout << "pos=" << (*cit).mPos << "\t q=(" << objectsLeft << "," << objectsRight <<")\t r=("  
     936                         << lbox.SurfaceArea() << "," << rbox.SurfaceArea() << ")" << endl; 
     937                cout << "minborder: " << minBorder << " maxborder: " << maxBorder << endl; 
     938            cout << "cost= " << sum << endl; 
     939*/ 
     940         
     941                if (sum < minSum)  
     942                {       //cout <<" sum: " << sum; 
     943                        minSum = sum; 
     944                        areaLeft = al; 
     945                        areaRight = ar; 
     946 
     947                        // objects belong to left side now 
     948                        for (; currentPos != (cit + 1); ++ currentPos); 
     949                } 
     950        } 
     951 
     952        //////////////////////////////////////////// 
     953        //-- assign object to front and back volume 
     954 
     955        // belongs to back bv 
     956        for (cit = mSubdivisionCandidates->begin(); cit != currentPos; ++ cit) 
     957                objectsBack.push_back((*cit).mObject); 
     958         
     959        // belongs to front bv 
     960        for (cit = currentPos; cit != cit_end; ++ cit) 
     961                objectsFront.push_back((*cit).mObject); 
     962 
     963        float newCost = minSum / boxArea; 
     964        float ratio = newCost / totalRenderCost; 
     965   
     966#ifdef _DEBUG 
     967        cout << "\n\nobjects=(" << (int)objectsBack.size() << "," << (int)objectsFront.size() << " of "  
     968                 << (int)tData.mNode->mObjects.size() << ")\t area=("  
     969                 << areaLeft << ", " << areaRight << ", " << boxArea << ")" << endl 
     970                 << "cost= " << newCost << " oldCost=" << totalRenderCost / boxArea << endl; 
     971#endif 
     972 
     973        return ratio; 
     974} 
     975#else 
     976 
     977float BvHierarchy::EvalSah(const BvhTraversalData &tData, 
     978                                                   const int axis, 
     979                                                   ObjectContainer &objectsFront, 
     980                                                   ObjectContainer &objectsBack) 
     981{ 
     982        // go through the lists, count the number of objects left and right 
     983        // and evaluate the following cost funcion: 
     984        // C = ct_div_ci  + (ol + or) / queries 
     985        PrepareLocalSubdivisionCandidates(tData, axis); 
     986 
     987        const float totalRenderCost = EvalAbsCost(tData.mNode->mObjects); 
     988        float objectsLeft = 0, objectsRight = totalRenderCost; 
     989   
     990        const AxisAlignedBox3 nodeBbox = tData.mNode->GetBoundingBox(); 
     991 
     992        const float minBox = nodeBbox.Min(axis); 
     993        const float maxBox = nodeBbox.Max(axis); 
     994        const float boxArea = nodeBbox.SurfaceArea(); 
     995 
     996        float minSum = 1e20f; 
     997   
     998        Vector3 minBorder = nodeBbox.Max(); 
     999        Vector3 maxBorder = nodeBbox.Min(); 
     1000 
     1001        float areaLeft = 0, areaRight = 0; 
     1002 
     1003        SortableEntryContainer::const_iterator currentPos = 
     1004                mSubdivisionCandidates->begin(); 
     1005         
     1006        vector<Vector3> bordersRight; 
     1007 
     1008        if (mUseBboxAreaForSah) 
     1009        { 
     1010                // we keep track of both borders of the bounding boxes => 
     1011                // store the events in descending order 
     1012                bordersRight.resize(mSubdivisionCandidates->size()); 
     1013 
     1014                SortableEntryContainer::reverse_iterator rcit =  
     1015                        mSubdivisionCandidates->rbegin(), rcit_end = mSubdivisionCandidates->rend(); 
     1016         
     1017                vector<Vector3>::reverse_iterator rbit = bordersRight.rbegin(); 
     1018         
     1019                for (; rcit != rcit_end; ++ rcit, ++ rbit)  
     1020                { 
     1021                        Intersectable *obj = (*rcit).mObject; 
     1022                        const AxisAlignedBox3 obox = obj->GetBox(); 
     1023 
     1024                        for (int i = 0; i < 3; ++ i) 
     1025                        { 
     1026                                if (obox.Min(i) < minBorder[i]) 
     1027                                { 
     1028                                        minBorder[i] = obox.Min(i); 
     1029                                } 
     1030                        } 
     1031 
     1032                        (*rbit) = minBorder; 
     1033                } 
     1034        } 
     1035 
     1036        // temporary surface areas 
     1037        float al = 0; 
     1038        float ar = boxArea; 
     1039 
     1040        vector<Vector3>::const_iterator bit = bordersRight.begin(); 
     1041        SortableEntryContainer::const_iterator cit, cit_end = mSubdivisionCandidates->end(); 
     1042 
     1043        for (cit = mSubdivisionCandidates->begin(); cit != cit_end; ++ cit, ++ bit)  
     1044        { 
     1045                Intersectable *obj = (*cit).mObject; 
     1046 
     1047                const float renderCost = mViewCellsManager->EvalRenderCost(obj); 
     1048                 
     1049                objectsLeft += renderCost; 
     1050                objectsRight -= renderCost; 
     1051 
     1052                const AxisAlignedBox3 obox = obj->GetBox(); 
     1053 
     1054                if (mUseBboxAreaForSah) 
     1055                { 
     1056                        AxisAlignedBox3 lbox = nodeBbox; 
     1057                        AxisAlignedBox3 rbox = nodeBbox; 
     1058         
     1059                        // the borders of the bounding boxes have changed 
     1060                        for (int i = 0; i < 3; ++ i) 
     1061                        { 
     1062                                if (obox.Max(i) > maxBorder[i]) 
     1063                                { 
     1064                                        maxBorder[i] = obox.Max(i); 
     1065                                } 
     1066                        } 
     1067 
     1068                        minBorder = (*bit); 
     1069 
     1070                        lbox.SetMax(maxBorder); 
     1071                        rbox.SetMin(minBorder); 
     1072         
     1073                        al = lbox.SurfaceArea(); 
     1074                        ar = rbox.SurfaceArea(); 
     1075                } 
     1076                else 
     1077                { 
     1078                        // just add up areas of the objects itself 
     1079                        // (as we are not sampling volumetric visibility, 
     1080                        // this should provide better heuristics 
     1081                        const float area = obj->GetArea();//obox.SurfaceArea(); 
     1082 
     1083                        al += area; 
     1084                        ar -= area; 
     1085                } 
     1086 
     1087                const bool noValidSplit = ((objectsLeft <= Limits::Small) || (objectsRight <= Limits::Small)); 
    9321088                const float sum =  noValidSplit ? 1e25 : objectsLeft * al + objectsRight * ar; 
    9331089       
     
    9711127#endif 
    9721128 
    973   return ratio; 
    974 } 
    975  
     1129        return ratio; 
     1130} 
     1131 
     1132#endif 
    9761133 
    9771134static bool PrepareOutput(const int axis, 
     
    14801637        // probability that view point lies in a view cell which sees this node 
    14811638        const float p = EvalViewCellsVolume(objects) / viewSpaceVol; 
    1482     float objRenderCost = EvalAbsCost(objects); 
     1639    const float objRenderCost = EvalAbsCost(objects); 
    14831640         
    14841641        return objRenderCost * p; 
     
    21612318        // sets the pointers to the currently active view cells 
    21622319        CollectLeaves(node, leaves); 
    2163  
    2164         vector<BvhLeaf *>::const_iterator bit, bit_end = leaves.end(); 
    2165  
    2166         for (bit = leaves.begin(); bit != bit_end; ++ bit) 
    2167         { 
    2168                 (*bit)->SetActiveNode(node); 
     2320        vector<BvhLeaf *>::const_iterator lit, lit_end = leaves.end(); 
     2321 
     2322        for (lit = leaves.begin(); lit != lit_end; ++ lit) 
     2323        { 
     2324                (*lit)->SetActiveNode(node); 
    21692325        } 
    21702326} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r1695 r1713  
    14271427                                        "0"); 
    14281428 
     1429        RegisterOption("ViewCells.Evaluation.stepSize", 
     1430                                        optInt, 
     1431                                        "view_cells_evaluation_step_size=", 
     1432                                        "100"); 
     1433 
    14291434        RegisterOption("ViewCells.maxPvsRatio", 
    14301435                                        optFloat, 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1710 r1713  
    17471747                HierarchyNodeWrapper *nodeWrapper = tqueue.top(); 
    17481748                tqueue.pop(); 
    1749  
     1749                //cout << "priority: " << nodeWrapper->GetMergeCost() << endl; 
    17501750                // save the view cells if it is a leaf or if enough view cells have already been traversed 
    17511751                // because of the priority queue, this will be the optimal set of v 
     
    17551755                        ) 
    17561756                { 
    1757                         if (nodeWrapper->Type() == HierarchyNodeWrapper::VSP_NODE) 
     1757                        if (nodeWrapper->Type() == HierarchyNodeWrapper::VIEW_CELL) 
    17581758                        { 
     1759                                //cout << "1"; 
    17591760                                ViewCellWrapper *viewCellWrapper = dynamic_cast<ViewCellWrapper *>(nodeWrapper); 
    17601761                                viewCells.push_back(viewCellWrapper->mViewCell); 
     
    17621763                        else 
    17631764                        { 
     1765                                //cout << "0"; 
    17641766                                BvhNodeWrapper *bvhNodeWrapper = dynamic_cast<BvhNodeWrapper *>(nodeWrapper); 
    17651767                                bvhNodes.push_back(bvhNodeWrapper->mNode); 
     
    17761778 
    17771779 
    1778 bool HierarchyManager::ExtractStatistics(const int maxSplits, 
    1779                                                                                  const float maxMemoryCost, 
    1780                                                                                  float &renderCost, 
    1781                                                                                  float &memory, 
    1782                                                                                  int &pvsEntries) 
     1780int HierarchyManager::ExtractStatistics(const int maxSplits, 
     1781                                                                                const float maxMemoryCost, 
     1782                                                                                float &renderCost, 
     1783                                                                                float &memory, 
     1784                                                                                int &pvsEntries) 
    17831785{ 
    17841786        ViewCellContainer viewCells; 
     
    17871789        // collect best set of view cells for this #splits 
    17881790    CollectBestSet(maxSplits, maxMemoryCost, viewCells, bvhNodes); 
    1789  
     1791        //cout << "here5 " << bvhNodes.size() << endl; 
    17901792        vector<BvhNode *>::const_iterator bit, bit_end = bvhNodes.end(); 
    17911793         
     1794        // set new nodes to be active 
    17921795        for (bit = bvhNodes.begin(); bit != bit_end; ++ bit) 
    17931796        { 
     
    17971800        ViewCellContainer::const_iterator vit, vit_end = viewCells.end(); 
    17981801 
    1799         int numEntries = 0; 
    1800         float pvsCost = 0.0f; 
    1801  
     1802        pvsEntries = 0; 
     1803        renderCost = 0.0f; 
     1804 
     1805        //BvhNode::NewMail(); 
     1806        //int dummy = 0; 
    18021807        for (vit = viewCells.begin(); vit != vit_end; ++ vit) 
    18031808        { 
     1809                float rc = 0; 
    18041810                ViewCell *vc = *vit; 
    18051811                ObjectPvs pvs; 
    18061812                mVspTree->mViewCellsTree->GetPvs(vc, pvs); 
    1807  
     1813                //dummy+=pvs.GetSize(); 
    18081814                BvhNode::NewMail(); 
    18091815 
     
    18141820                { 
    18151821                        BvhIntersectable *intersect = dynamic_cast<BvhIntersectable *>((*oit).first); 
     1822 
    18161823                        BvhLeaf *leaf = intersect->GetItem(); 
    18171824                        BvhNode *activeNode = leaf->GetActiveNode(); 
     
    18211828                                activeNode->Mail(); 
    18221829 
    1823                                 ++ numEntries; 
    1824                                 pvsCost += mBvHierarchy->EvalAbsCost(leaf->mObjects); 
     1830                                ObjectContainer objects; 
     1831                                activeNode->CollectObjects(objects); 
     1832 
     1833                                ++ pvsEntries; 
     1834                                rc += mBvHierarchy->EvalAbsCost(objects); 
     1835                                //cout << " pvs: " << mBvHierarchy->EvalAbsCost(leaf->mObjects); 
    18251836                        } 
    18261837                } 
    1827         } 
    1828  
    1829         return ((int)(viewCells.size() + bvhNodes.size()) < mHierarchyStats.Leaves()); 
     1838 
     1839                rc *= vc->GetVolume(); 
     1840                renderCost += rc; 
     1841        } 
     1842 
     1843        renderCost /= mVspTree->mViewCellsManager->GetViewSpaceBox().GetVolume(); 
     1844 
     1845        memory = pvsEntries * ObjectPvs::GetEntrySize(); 
     1846        //cout << "viewCells: " << (int)viewCells.size() << " nodes: " << (int)bvhNodes.size() << " rc: " << renderCost << " entries: " << pvsEntries << endl; 
     1847 
     1848        return viewCells.size() + bvhNodes.size(); 
    18301849} 
    18311850 
     
    19842003 
    19852004void HierarchyManager::EvaluateSubdivision2(ofstream &splitsStats, 
    1986                                                                                         ofstream &memStats, 
    1987                                                                                         const int splitsStepSize, 
    1988                                                                                         const float memStepSize) 
     2005                                                                                        const int splitsStepSize) 
    19892006{ 
    19902007        int splits = 0; 
    1991         float mem = 15; 
    19922008 
    19932009        float renderCost; 
     
    19972013        while (1) 
    19982014        { 
    1999                 if (!ExtractStatistics(splits, 99999.0, renderCost, memory, pvsEntries)) 
     2015                const int numSplits = ExtractStatistics(splits, 99999.0, renderCost, memory, pvsEntries); 
     2016                 
     2017                UpdateStats(splitsStats, numSplits, renderCost, pvsEntries, memory, 0); 
     2018                splits += splitsStepSize; 
     2019 
     2020                if (numSplits == mHierarchyStats.Leaves()) 
    20002021                        break; 
    2001  
    2002                 UpdateStats(splitsStats, splits, renderCost, pvsEntries, memory, 0); 
    2003  
    2004                 splits += splitsStepSize; 
    2005         } 
    2006  
    2007         while (1) 
    2008         { 
    2009                 if (!ExtractStatistics(99999999, mem, renderCost, memory, pvsEntries)) 
    2010                         break; 
    2011  
    2012                 UpdateStats(splitsStats, splits, renderCost, pvsEntries, memory, 0); 
    2013  
    2014                 mem += memStepSize; 
    2015         } 
    2016  
    2017 } 
    2018  
    2019 } 
     2022        } 
     2023} 
     2024 
     2025} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r1710 r1713  
    241241 
    242242        void EvaluateSubdivision2(ofstream &splitsStats, 
    243                                                           ofstream &memStats, 
    244                                                           const int splitsStepSize, 
    245                                                           const float memStepSize); 
     243                                                          const int splitsStepSize); 
    246244 
    247245 
     
    461459                                                vector<BvhNode *> &bvhNodes); 
    462460 
    463         bool ExtractStatistics(const int maxSplits, 
    464                                                    const float maxMemoryCost, 
    465                                                    float &renderCost, 
    466                                                    float &memory, 
    467                                                    int &pvsEntries); 
     461        int ExtractStatistics(const int maxSplits, 
     462                                                  const float maxMemoryCost, 
     463                                                  float &renderCost, 
     464                                                  float &memory, 
     465                                                  int &pvsEntries); 
    468466 
    469467 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1701 r1713  
    313313        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    314314 
    315         //AxisAlignedBox3 bbox = mSceneGraph->GetBox(); bbox.Enlarge(30.0); 
     315        AxisAlignedBox3 bbox = mSceneGraph->GetBox(); bbox.Enlarge(30.0); 
    316316        for (oit = objects.begin(); oit != oit_end; ++ oit) 
    317317        { 
     
    321321                { 
    322322                        Triangle3 tri = dynamic_cast<TriangleIntersectable *>(obj)->GetItem(); 
    323  
    324323                        //if (bbox.IsInside(tri.mVertices[0]) && bbox.IsInside(tri.mVertices[1]) && bbox.IsInside(tri.mVertices[2])) 
    325324                        //{ 
    326                         samplesOut << "v " << tri.mVertices[0].x << " " << tri.mVertices[0].y << " " << tri.mVertices[0].z << endl; 
    327                         samplesOut << "v " << tri.mVertices[1].x << " " << tri.mVertices[1].y << " " << tri.mVertices[1].z << endl; 
    328                         samplesOut << "v " << tri.mVertices[2].x << " " << tri.mVertices[2].y << " " << tri.mVertices[2].z << endl; 
     325                                samplesOut << "v " << tri.mVertices[0].x << " " << tri.mVertices[0].y << " " << tri.mVertices[0].z << endl; 
     326                                samplesOut << "v " << tri.mVertices[1].x << " " << tri.mVertices[1].y << " " << tri.mVertices[1].z << endl; 
     327                                samplesOut << "v " << tri.mVertices[2].x << " " << tri.mVertices[2].y << " " << tri.mVertices[2].z << endl; 
    329328                        //} 
    330329                } 
     
    337336        // write faces 
    338337        int i = 1; 
    339         for (oit = objects.begin(); oit != oit_end; ++ oit, i += 3) 
     338        for (oit = objects.begin(); oit != oit_end; ++ oit) 
    340339        { 
    341340                Intersectable *obj = *oit; 
    342341                if (obj->Type() == Intersectable::TRIANGLE_INTERSECTABLE) 
    343342                { 
    344                         Triangle3 tri = dynamic_cast<TriangleIntersectable *>(obj)->GetItem(); 
    345                         samplesOut << "f " << i << " " << i + 1 << " " << i + 2 << endl; 
     343                        //Triangle3 tri = dynamic_cast<TriangleIntersectable *>(obj)->GetItem(); 
     344                        //if (bbox.IsInside(tri.mVertices[0]) && bbox.IsInside(tri.mVertices[1]) && bbox.IsInside(tri.mVertices[2])) 
     345                        //{ 
     346                                Triangle3 tri = dynamic_cast<TriangleIntersectable *>(obj)->GetItem(); 
     347                                samplesOut << "f " << i << " " << i + 1 << " " << i + 2 << endl; 
     348                                i += 3; 
     349                        //} 
    346350                } 
    347351                else 
     
    484488                        } 
    485489 
     490                        // temporare hack 
    486491                        //if (!strstr(filename.c_str(), "plane")) mSceneGraph->GetRoot()->UpdateBox(); 
    487492 
     
    507512                mObjects.reserve(intersectables); 
    508513                mSceneGraph->CollectObjects(&mObjects); 
     514                 
     515                // temp hack 
     516                //ExportObj("cropped_vienna.obj", mObjects); 
     517 
    509518                mSceneGraph->GetRoot()->UpdateBox(); 
    510  
     519                                 
    511520                cout << "finished loading" << endl; 
     521 
     522                 
    512523                if (0) 
    513524                { 
     
    11411152                pertub.y = RandomValue(0.0f, pertubDir); 
    11421153                pertub.z = RandomValue(0.0f, pertubDir); 
     1154 
    11431155                const Vector3 newDir = mainRay.mDirection + pertub; 
    11441156                //const Vector3 newDir = mainRay.mDirection; 
     
    11471159                pertub.y = RandomValue(0.0f, pertubOrigin); 
    11481160                pertub.z = RandomValue(0.0f, pertubOrigin); 
     1161 
    11491162                const Vector3 newOrigin = mainRay.mOrigin + pertub; 
    11501163                //const Vector3 newOrigin = mainRay.mOrigin; 
     
    11591172void Preprocessor::SetupRay(Ray &ray, 
    11601173                                                        const Vector3 &point, 
    1161                                                         const Vector3 &direction 
    1162                                                         ) const 
     1174                                                        const Vector3 &direction) const 
    11631175{ 
    11641176        ray.Clear(); 
    11651177        // do not store anything else then intersections at the ray 
    1166         ray.Init(point, direction, Ray::LOCAL_RAY); 
    1167          
    1168 } 
    1169  
    1170  
    1171 } 
     1178        ray.Init(point, direction, Ray::LOCAL_RAY);      
     1179} 
     1180 
     1181 
     1182} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp

    r1709 r1713  
    17071707        } 
    17081708 
    1709  
     1709        //////////////// 
    17101710        //-- pvs is not stored with the interiors => reconstruct 
    17111711        Intersectable::NewMail(); 
    17121712 
    1713         int pvsSize = 0; 
    17141713        ViewCell *root = vc; 
    17151714         
     
    17361735                { 
    17371736                        ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 
    1738  
    17391737                        ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 
    17401738 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1710 r1713  
    33843384                 
    33853385        // evaluate merge cost for priority traversal 
    3386         const float mergeCost = 1.0f / (float)root->mTimeStamp; 
     3386        const float mergeCost =  -(float)root->mTimeStamp; 
    33873387        vcRoot->SetMergeCost(mergeCost); 
    33883388 
     
    34283428                 
    34293429        // evaluate merge cost for priority traversal 
    3430         float mergeCost = 1.0f / (float)root->mTimeStamp; 
     3430        const float mergeCost = -(float)root->mTimeStamp; 
    34313431        viewCellInterior->SetMergeCost(mergeCost); 
    34323432 
     
    50485048                 
    50495049        // evaluate merge cost for priority traversal 
    5050         float mergeCost = 1.0f / (float)root->mTimeStamp; 
     5050        const float mergeCost = -(float)root->mTimeStamp; 
    50515051        viewCellInterior->SetMergeCost(mergeCost); 
    50525052 
     
    57475747        int numSamples; 
    57485748        int castSamples = 0; 
     5749        int splitsStepSize; 
     5750 
    57495751        char str[64];  
    5750  
     5752         
    57515753        Environment::GetSingleton()->GetIntValue("ViewCells.Evaluation.samplesPerPass", samplesPerPass); 
    57525754        Environment::GetSingleton()->GetIntValue("ViewCells.Evaluation.samples", numSamples); 
     5755        Environment::GetSingleton()->GetIntValue("ViewCells.Evaluation.stepSize", splitsStepSize); 
    57535756 
    57545757        char statsPrefix[100]; 
     
    57825785    cout << "Evaluating view cell partition ... " << endl; 
    57835786 
    5784         VssRayContainer evaluationSamples; 
    5785  
    57865787        while (castSamples < numSamples) 
    57875788        {                
     5789                VssRayContainer evaluationSamples; 
     5790 
    57885791                /////////////// 
    57895792                //-- we have to use uniform sampling strategy for construction rays 
     
    58225825                //-- output stats 
    58235826 
    5824                 const int splitsStepSize = 500; 
    5825                 const float memStepSize = 1.0f; 
    5826  
    5827                 sprintf(str, "-splits-%09d-eval.log", castSamples); 
     5827                sprintf(str, "-%09d-eval.log", castSamples); 
    58285828                const string splitsFilename = string(statsPrefix) + string(str); 
    5829                  
    5830                 sprintf(str, "-mem-%09d-eval.log", castSamples); 
    5831                 const string memFilename = string(statsPrefix) + string(str); 
    58325829 
    58335830                ofstream splitsStr(splitsFilename.c_str()); 
    5834                 ofstream memStr(memFilename.c_str()); 
    5835                  
    5836                 mHierarchyManager->EvaluateSubdivision2(splitsStr, memStr, splitsStepSize, memStepSize); 
     5831                mHierarchyManager->EvaluateSubdivision2(splitsStr, splitsStepSize); 
    58375832 
    58385833                timeDiff = TimeDiff(startTime, GetTime()); 
    58395834                cout << "finished in " << timeDiff * 1e-3 << " secs" << endl; 
    5840                 Debug << "statistis compted in " << timeDiff * 1e-3 << " secs" << endl; 
     5835                Debug << "statistics computed in " << timeDiff * 1e-3 << " secs" << endl; 
    58415836         
    58425837                disposeRays(evaluationSamples, NULL); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1703 r1713  
    244244                } 
    245245        } 
    246 //      Exporter *exporter= Exporter::GetExporter("test1.wrl"); 
    247 //      AxisAlignedBox3 bbox = preprocessor->mKdTree->GetBox();  
    248 //      bbox.Scale(Vector3(1, 1, 0.5)); 
    249 //exporter->ExportGeometry(preprocessor->mObjects);cout<<"here2"<<endl; 
    250  
     246        if (0){ 
     247        Exporter *exporter= Exporter::GetExporter("test1.wrl"); 
     248        AxisAlignedBox3 bbox = preprocessor->mKdTree->GetBox();  
     249        bbox.Scale(Vector3(0.5, 1, 0.5)); 
     250    exporter->SetWireframe(); 
     251        exporter->ExportBox(preprocessor->mKdTree->GetBox()); 
     252        exporter->ExportBox(bbox); 
     253        exporter->SetFilled(); 
     254        exporter->ExportGeometry(preprocessor->mObjects, true, &bbox); 
     255        delete exporter; 
     256        } 
     257         
     258         
    251259        // parse view cells related options 
    252260        if (!preprocessor->PrepareViewCells()) 
Note: See TracChangeset for help on using the changeset viewer.