Changeset 1421


Ignore:
Timestamp:
09/20/06 18:32:10 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
14 edited

Legend:

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

    r1415 r1421  
    211211 
    212212 
    213         //////////////////////////////////////////////// 
     213        ////////////////////////////// 
    214214        //-- max cost ratio for early tree termination 
    215215 
     
    221221 
    222222 
    223         ///////////////////////////////////////// 
     223        ////////////////////////////// 
    224224        //-- factors for subdivision heuristics 
    225225 
     
    239239 
    240240 
    241         ///////////////////////////////// 
     241        ///////////// 
    242242        //-- debug output 
    243243 
     
    294294        AxisAlignedBox3 parentBox = leaf->GetBoundingBox(); 
    295295 
    296         // update stats 
    297         mBvhStats.nodes += 2; // we have two new leaves 
     296        // update stats: we have two new leaves 
     297        mBvhStats.nodes += 2; 
    298298 
    299299        if (tData.mDepth > mBvhStats.maxDepth) 
     
    306306         
    307307 
    308         //////////////////////////////// 
     308        ////////////////// 
    309309        //-- create front and back leaf 
    310310 
     
    336336 
    337337 
    338         /////////////////////////////////////////////////////////////////// 
     338        //////////////////////////////////////// 
    339339        //-- fill  front and back traversal data with the new values 
    340340 
     
    393393        if (!LocalTerminationCriteriaMet(tData) && !globalCriteriaMet) 
    394394        {        
    395                 ////////////////////////////////////////// 
     395                ////////////// 
    396396                //-- continue subdivision 
    397397 
     
    412412 
    413413 
    414                 ///////////////////////////////////////// 
     414                /////////////////////////// 
    415415                //-- push the new split candidates on the queue 
    416416                 
     
    487487        const float renderCostDecr = oldRenderCost - newRenderCost; 
    488488 
    489 #ifdef _DEBUG 
     489//#ifdef _DEBUG 
    490490        Debug << "old render cost: " << oldRenderCost << endl; 
    491491        Debug << "new render cost: " << newRenderCost << endl; 
    492492        Debug << "render cost decrease: " << renderCostDecr << endl; 
    493 #endif 
     493//#endif 
    494494        splitCandidate.SetRenderCostDecrease(renderCostDecr); 
    495495 
     
    522522inline bool BvHierarchy::GlobalTerminationCriteriaMet(const BvhTraversalData &data) const 
    523523{ 
    524         // matt: TODO 
    525         return (0 
     524        const bool terminationCriteriaMet = 
     525                (0 
    526526                || (mBvhStats.Leaves() >= mTermMaxLeaves) 
    527527                || (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
    528528                //|| mOutOfMemory  
    529529                ); 
     530 
     531        if (0 && terminationCriteriaMet) 
     532        { 
     533                Debug << "bvh global termination criteria met:" << endl; 
     534                Debug << "cost misses: " << mGlobalCostMisses << " " << mTermGlobalCostMissTolerance << endl; 
     535                Debug << "leaves: " << mBvhStats.Leaves() << " " << mTermMaxLeaves << endl; 
     536        } 
     537 
     538        return terminationCriteriaMet;  
    530539} 
    531540 
     
    12331242void BvHierarchy::PrintSubdivisionStats(const SubdivisionCandidate &sc) 
    12341243{ 
    1235         const float costDecr = sc.GetRenderCostDecrease();       
     1244        const float costDecr =  
     1245                sc.GetRenderCostDecrease();// / mHierarchyManager->GetViewSpaceBox().GetVolume();        
    12361246 
    12371247        mSubdivisionStats  
    1238                         << "#Leaves\n" << mBvhStats.Leaves() 
     1248                        << "#Leaves\n" << mBvhStats.Leaves() << endl 
    12391249                        << "#RenderCostDecrease\n" << costDecr << endl  
    12401250                        << "#TotalRenderCost\n" << mTotalCost << endl; 
    1241                         //<< "#AvgRenderCost\n" << avgRenderCost << endl; 
    12421251} 
    12431252 
     
    12771286                        return 0.0f; 
    12781287 
    1279                 ///////////////////////////// 
     1288                //////////////////// 
    12801289                //-- surface area heuristics 
    12811290 
     
    12831292                const float area = box.SurfaceArea(); 
    12841293 
    1285                 return (float)objects.size() * area; 
     1294                return (float)objects.size() * area / mHierarchyManager->GetViewSpaceBox().SurfaceArea(); 
    12861295        } 
    12871296        else 
    1288         {       ///////////////////////////// 
     1297        {       //////////////////// 
    12891298                //-- render cost heuristics 
    12901299 
     
    16471656        //-- we don't have to sort them here and an binary search  
    16481657        //-- for identifying if a object is in a leaf. 
    1649  
     1658         
    16501659        mBvhStats.Reset(); 
    16511660        mBvhStats.Start(); 
     1661 
    16521662        mBvhStats.nodes = 1; 
    1653  
     1663        mGlobalCostMisses = 0; 
     1664         
    16541665        // store pointer to this tree 
    16551666        BvhSubdivisionCandidate::sBvHierarchy = this; 
    1656         mBvhStats.nodes = 1; 
    1657         mGlobalCostMisses = 0; 
    1658  
     1667         
    16591668        // compute bounding box from objects 
    16601669        // note: we assume that root was already created 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r1418 r1421  
    24272427                                        optFloat, 
    24282428                                        "hierarchy_term_min_global_cost_ratio=", 
    2429                                         "0.00001"); 
     2429                                        "0.9"); 
    24302430 
    24312431        RegisterOption("Hierarchy.Termination.globalCostMissTolerance", 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp

    r1420 r1421  
    267267                { 
    268268                case Intersectable::TRIANGLE_INTERSECTABLE: 
    269                         {cout << "y"; 
     269                        { 
    270270                                TriangleIntersectable *ti = dynamic_cast<TriangleIntersectable *>(obj); 
    271271                                polys.push_back(new Polygon3(ti->GetItem())); 
     
    273273                        } 
    274274                case Intersectable::MESH_INSTANCE: 
    275                         {cout << "x"; 
     275                        { 
    276276                                MeshInstance *mi = dynamic_cast<MeshInstance *>(obj); 
    277277                                ExportMesh(mi->GetMesh()); 
    278                                 //polys.push_back(new Polygon3(ti->GetItem())); 
    279                 break; 
     278                                break; 
    280279                        } 
    281280                default: 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1420 r1421  
    3434 
    3535 
    36 HierarchyManager::HierarchyManager(VspTree *vspTree,  
    37                                                                    const int objectSpaceSubdivisionType): 
     36HierarchyManager::HierarchyManager(const int objectSpaceSubdivisionType): 
    3837mObjectSpaceSubdivisionType(objectSpaceSubdivisionType), 
    39 mVspTree(vspTree),  
    4038mOspTree(NULL),  
    4139mBvHierarchy(NULL) 
     
    5755 
    5856        // hierarchy manager links view space partition and object space partition 
     57        mVspTree = new VspTree(); 
    5958        mVspTree->mHierarchyManager = this; 
    6059         
     
    6362 
    6463 
    65 HierarchyManager::HierarchyManager(VspTree *vspTree, KdTree *kdTree):  
     64HierarchyManager::HierarchyManager(KdTree *kdTree):  
    6665mObjectSpaceSubdivisionType(KD_BASED_OBJ_SUBDIV), 
    67 mVspTree(vspTree),  
    6866mBvHierarchy(NULL) 
    6967{ 
     
    7169        mOspTree->mVspTree = mVspTree; 
    7270 
     71        mVspTree = new VspTree(); 
    7372        mVspTree->mHierarchyManager = this; 
    7473 
     
    120119{ 
    121120        DEL_PTR(mOspTree); 
    122         //DEL_PTR(mVspTree); 
     121        DEL_PTR(mVspTree); 
    123122        DEL_PTR(mBvHierarchy); 
    124123} 
     
    232231bool HierarchyManager::GlobalTerminationCriteriaMet(SubdivisionCandidate *candidate) const 
    233232{ 
    234         return (0 
     233        const bool terminationCriteriaMet =  
     234                (0 
    235235                || (mHierarchyStats.Leaves() >= mTermMaxLeaves)  
    236                 //|| (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
    237                 ||      candidate->GlobalTerminationCriteriaMet() 
     236                || (mGlobalCostMisses >= mTermGlobalCostMissTolerance) 
     237                ||(candidate->GlobalTerminationCriteriaMet()) 
    238238                ); 
     239 
     240        if (0 && terminationCriteriaMet) 
     241        { 
     242                Debug << "hierarchy global termination criteria met:" << endl; 
     243                Debug << "leaves: " << mHierarchyStats.Leaves() << " " << mTermMaxLeaves << endl; 
     244                Debug << "cost misses: " << mGlobalCostMisses << " " << mTermGlobalCostMissTolerance << endl; 
     245        } 
     246        return terminationCriteriaMet; 
    239247} 
    240248 
     
    306314                mVspTree->PrepareConstruction(sampleRays, *viewSpaceRays); 
    307315 
     316        mTotalCost = mVspTree->mTotalCost; 
     317        Debug << "\nreseting cost, new total cost: " << mTotalCost << endl; 
     318 
    308319        mTQueue.Push(vsc); 
    309320} 
     
    328339 
    329340{ 
    330         cout << "starting bv hierarchy construction ... " << endl; 
     341        const long startTime = GetTime(); 
     342 
     343        cout << "preparing bv hierarchy construction ... " << endl; 
    331344        mBvHierarchy->CreateRoot(objects); 
    332345 
     
    339352 
    340353    mTQueue.Push(sc); 
     354        cout << "finished bv hierarchy preparation in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
    341355} 
    342356 
     
    357371 
    358372        mTotalCost = mOspTree->mTotalCost; 
    359         Debug << "reseting cost, new total cost: " << mTotalCost << endl; 
     373        Debug << "\nreseting cost, new total cost: " << mTotalCost << endl; 
    360374         
    361375    mTQueue.Push(osc); 
     
    739753 
    740754 
    741 void HierarchyManager::PrintHierarchyStatistics(ofstream &stream) const 
     755void HierarchyManager::PrintHierarchyStatistics(ostream &stream) const 
    742756{ 
    743757        stream << mHierarchyStats << endl; 
    744  
    745758        stream << "\nview space:" << endl << endl; 
    746759        stream << mVspTree->GetStatistics() << endl; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r1419 r1421  
    139139 
    140140public: 
    141         /** Constructor with the object space hierarchy type as argument. 
    142         */ 
    143         HierarchyManager(VspTree *vspTree, const int objectSpaceHierarchyType); 
     141        /** Constructor with the view space partition tree and 
     142                the object space hierarchy type as argument. 
     143        */ 
     144        HierarchyManager(const int objectSpaceHierarchyType); 
    144145        /** Hack: OspTree will copy the content from this kd tree. 
    145146                Only view space hierarchy will be constructed. 
    146147        */ 
    147         HierarchyManager(VspTree *vspTree, KdTree *kdTree); 
    148  
     148        HierarchyManager(KdTree *kdTree); 
     149 
     150        /** Deletes space partition and view space partition. 
     151        */ 
    149152        ~HierarchyManager(); 
    150153 
     
    196199                float &contribution) const; 
    197200 
    198         void PrintHierarchyStatistics(ofstream &stream) const; 
    199  
     201        /** Print out statistics. 
     202        */ 
     203        void PrintHierarchyStatistics(ostream &stream) const; 
     204 
     205        /** Returns the view space partition tree. 
     206        */ 
    200207        VspTree *GetVspTree(); 
    201208 
     209        /** Returns view space bounding box. 
     210        */ 
    202211        AxisAlignedBox3 GetViewSpaceBox() const; 
     212        /** Returns object space bounding box. 
     213        */ 
    203214        AxisAlignedBox3 GetObjectSpaceBox() const; 
    204215 
     216        /** Exports object space hierarchy for visualization. 
     217        */ 
    205218        void ExportObjectSpaceHierarchy( 
    206219                Exporter *exporter,  
     
    209222                const bool exportBounds = true) const; 
    210223 
    211  
     224        /** Returns intersectable pierced by this ray. 
     225        */ 
    212226        Intersectable *GetIntersectable( 
    213227                const VssRay &ray,  
     
    216230        friend ostream &operator<<(ostream &s, const HierarchyManager &hm)  
    217231        { 
    218                 hm.mHierarchyStats.Print(s); 
     232                hm.PrintHierarchyStatistics(s); 
    219233                return s; 
    220234        }  
     235 
    221236 
    222237protected: 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ObjParser.cpp

    r1379 r1421  
    211211                        { 
    212212                                cout << "f"; 
    213 #if CONNECT_SEQUENTIAL_FACES 
    214                                 Face *face = LoadFace(str, vertices, hashTable); 
    215                                 if (!face) break; 
    216          
    217                                 faces.push_back(face); 
    218  
    219                                 if (faces.size() >= nMaxFaces) 
     213 
     214                                if (loadMeshes) 
    220215                                { 
    221                                         ProcessMesh(faces, hashTable, root, parents); 
     216                                        Face *face = LoadFace(str, vertices, hashTable); 
     217                                        if (!face) break; 
     218         
     219                                        faces.push_back(face); 
     220 
     221                                        if (faces.size() >= nMaxFaces) 
     222                                        { 
     223                                                ProcessMesh(faces, hashTable, root, parents); 
     224                                        } 
    222225                                } 
    223 #else 
    224                                 Triangle3 triangle = LoadTriangle(str, vertices, hashTable); 
     226                                else 
     227                                { 
     228                                        Triangle3 triangle = LoadTriangle(str, vertices, hashTable); 
    225229                                 
    226                                 TriangleIntersectable *obj = new TriangleIntersectable(triangle); 
    227                                 root->mGeometry.push_back(obj); 
    228  
    229                                 // matt: we don't really need to keep an additional data structure 
    230                                 // if working with triangles => remove this 
    231                                 if (parents)  
    232                                 { 
    233                                         FaceParentInfo info(obj, 0); 
    234                                         parents->push_back(info); 
     230                                        TriangleIntersectable *obj = new TriangleIntersectable(triangle); 
     231                                        root->mGeometry.push_back(obj); 
     232 
     233                                        // matt: we don't really need to keep an additional data structure 
     234                                        // if working with triangles => remove this 
     235                                        if (parents)  
     236                                        { 
     237                                                FaceParentInfo info(obj, 0); 
     238                                                parents->push_back(info); 
     239                                        } 
    235240                                } 
    236 #endif 
    237241                                break; 
    238242                        }   // end face 
     
    242246        } 
    243247 
    244 #if CONNECT_SEQUENTIAL_FACES 
    245         // there could be faces remaining 
    246         if (!faces.empty()) 
    247         {        
    248                 ProcessMesh(faces, hashTable, root, parents); 
    249         } 
    250 #endif 
     248        if (loadMeshes) 
     249        { 
     250                // there could be faces remaining 
     251                if (!faces.empty()) 
     252                {        
     253                        ProcessMesh(faces, hashTable, root, parents); 
     254                } 
     255        } 
     256 
    251257        // reset tables 
    252258        hashTable.clear(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1418 r1421  
    131131mBspTree(NULL), 
    132132mVspBspTree(NULL), 
    133 mVspTree(NULL), 
    134133mHierarchyManager(NULL), 
    135134mViewCellsManager(NULL), 
     
    185184        cout << "Deleting kd tree...\n"; 
    186185        DEL_PTR(mKdTree); 
    187         cout << "done.\n"; 
    188  
    189         cout << "Deleting vsp tree...\n"; 
    190         DEL_PTR(mVspTree); 
    191186        cout << "done.\n"; 
    192187 
     
    505500                const bool ishack = false; 
    506501                if (ishack) 
    507                         hierarchyManager = new HierarchyManager(mVspTree, mKdTree); 
     502                        hierarchyManager = new HierarchyManager(mKdTree); 
    508503                else 
    509                         hierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::KD_BASED_OBJ_SUBDIV); 
     504                        hierarchyManager = new HierarchyManager(HierarchyManager::KD_BASED_OBJ_SUBDIV); 
    510505        } 
    511506        else if (strcmp(name, "bvh") == 0) 
    512507        { 
    513508                Debug << "hierarchy manager: bvh" << endl; 
    514                 hierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::BV_BASED_OBJ_SUBDIV); 
     509                hierarchyManager = new HierarchyManager(HierarchyManager::BV_BASED_OBJ_SUBDIV); 
    515510        } 
    516511        else // only view space partition 
    517512        { 
    518513                Debug << "hierarchy manager: obj" << endl; 
    519                 hierarchyManager = new HierarchyManager(mVspTree, HierarchyManager::NO_OBJ_SUBDIV); 
     514                hierarchyManager = new HierarchyManager(HierarchyManager::NO_OBJ_SUBDIV); 
    520515        } 
    521516 
     
    548543        else if (strcmp(name, "vspOspTree") == 0) 
    549544        { 
    550                 mVspTree = new VspTree(); 
     545                Debug << "view cell type: VspOsp" << endl; 
    551546                char buf[100];           
    552547                Environment::GetSingleton()->GetStringValue("Hierarchy.type", buf);      
     
    555550                mViewCellsManager = new VspOspViewCellsManager(vcTree, mHierarchyManager); 
    556551        } 
    557         else if (strcmp(name, "sceneDependent") == 0) 
     552        else if (strcmp(name, "sceneDependent") == 0) //TODO 
    558553        { 
    559554                Debug << "view cell type: Bsp" << endl; 
    560  
    561                 //TODO 
     555                 
    562556                mBspTree = new BspTree(); 
    563557                mViewCellsManager = new BspViewCellsManager(vcTree, mBspTree); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h

    r1418 r1421  
    199199  /// View space partition bsp tree 
    200200  VspBspTree *mVspBspTree; 
    201   // view space partition tree 
    202   VspTree *mVspTree; 
     201  /// Hierarchy manager handling view space and object space partition 
    203202  HierarchyManager *mHierarchyManager; 
    204203  /// BSP tree representing the viewcells 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Triangle3.cpp

    r1420 r1421  
    100100   
    101101        const Vector3 pt = ray.GetLoc() + t * dir;  
    102  
     102#if _DEBUG 
    103103        if (!pt.CheckValidity()) 
    104104        { 
     
    106106                cout << "v: " << pt << " t: " << t << " a: " << a << " b: " << b << " n: " << normal << endl; 
    107107        } 
    108  
     108#endif 
    109109        const Vector3 w = pt - mVertices[1]; 
    110110 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1420 r1421  
    47814781        GetRaySets(rays, mInitialSamples, constructionRays, &savedRays); 
    47824782 
    4783         Debug << "initial rays: " << (int)constructionRays.size() << endl; 
     4783        Debug << "initial rays used for construction: " << (int)constructionRays.size() << endl; 
    47844784        Debug << "saved rays: " << (int)savedRays.size() << endl; 
    47854785 
     
    47944794 
    47954795        // print subdivision statistics 
    4796         Debug << endl << endl << mHierarchyManager << endl; 
     4796        Debug << endl << endl << *mHierarchyManager << endl; 
    47974797        //mHierarchyManager->PrintHierarchyStatistics(Debug); 
    47984798 
     
    55835583 
    55845584        cout << "reseting pvs ... "; 
    5585                  
    55865585        const bool startFromZero = true; 
    5587  
    55885586 
    55895587        // reset pvs and start over from zero 
     
    56325630        mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 
    56335631        float rc = 0; 
     5632 
    56345633        ViewCellContainer::const_iterator vit, vit_end = leaves.end(); 
     5634         
    56355635        for (vit = leaves.begin(); vit != vit_end; ++ vit) 
    56365636        { 
     
    56395639                float vol = vc->GetVolume(); 
    56405640                rc += pvs * vol; 
    5641  
    56425641        } 
    56435642 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r1416 r1421  
    979979}; 
    980980 
    981 #define TEST_EVALUATION 1 
     981#define TEST_EVALUATION 0 
    982982 
    983983/** 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp

    r1297 r1421  
    621621 
    622622                                mHierarchyManager =  
    623                                         new HierarchyManager(mVspTree, HierarchyManager::KD_BASED_OBJ_SUBDIV); 
     623                                        new HierarchyManager(HierarchyManager::KD_BASED_OBJ_SUBDIV); 
     624 
     625                                DEL_PTR(mHierarchyManager->mVspTree); 
     626                                mHierarchyManager->mVspTree = mVspTree; 
    624627 
    625628                                mObjectSpaceHierarchyType = OSP; 
     
    642645                                mObjectSpaceHierarchyType = BVH; 
    643646                                mHierarchyManager =  
    644                                         new HierarchyManager(mVspTree, HierarchyManager::BV_BASED_OBJ_SUBDIV); 
     647                                        new HierarchyManager(HierarchyManager::BV_BASED_OBJ_SUBDIV); 
     648 
     649                                DEL_PTR(mHierarchyManager->mVspTree); 
     650                                mHierarchyManager->mVspTree = mVspTree; 
    645651                        } 
    646652                } 
     
    905911                } 
    906912        } 
    907         //cout << "\nview space box: " << mViewSpaceBox << endl; 
    908 } 
    909  
    910  
    911 void ViewCellsParseHandlers::CreateViewCellsManager(/*const char *name*/) 
     913} 
     914 
     915 
     916void ViewCellsParseHandlers::CreateViewCellsManager() 
    912917{ 
    913918        if (mViewSpaceHierarchyType == BSP) 
     
    920925        { 
    921926                Debug << "creating view cells manager: VspOsp" << endl; 
    922  
    923927                // hack 
    924928                mViewCellsManager = new VspOspViewCellsManager(mViewCellsTree, mHierarchyManager); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r1418 r1421  
    359359 
    360360 
     361 
    361362/*************************************************************************/ 
    362363/*                       class VspTree implementation                    */ 
     
    367368mRoot(NULL), 
    368369mOutOfBoundsCell(NULL), 
    369 mStoreRays(true), 
     370mStoreRays(false), 
    370371mTimeStamp(1), 
    371372mHierarchyManager(NULL) 
     
    566567        if (0 && terminationCriteriaMet) 
    567568        { 
    568                 Debug << "globlal termination criteria met:" << endl; 
     569                Debug << "vsp global termination criteria met:" << endl; 
    569570                Debug << "cost misses: " << mGlobalCostMisses << " " << mTermGlobalCostMissTolerance << endl; 
    570571                Debug << "leaves: " << mVspStats.Leaves() << " " <<  mMaxViewCells << endl; 
     
    696697                ///////////// 
    697698                //-- store pvs optained from rays 
     699 
    698700                AddSamplesToPvs(leaf, *tData.mRays, sampCon, conSamp); 
    699701 
     
    12951297        } 
    12961298         
    1297          
     1299        /////////        
    12981300        //-- compute cost 
    12991301 
     
    14791481        // the render cost decrase for this split 
    14801482        const float renderCostDecrease = (oldRenderCost - newRenderCost) / viewSpaceVol; 
    1481 #ifdef _DEBUG 
    1482         Debug << "\neval vsp render cost decrease" << endl 
     1483 
     1484//#ifdef _DEBUG 
     1485        Debug << "\nvsp render cost decrease" << endl 
    14831486                  << "back pvs: " << pvsBack << " front pvs " << pvsFront << " total pvs: " << totalPvs << endl  
    14841487                  << "back p: " << pBack / viewSpaceVol << " front p " << pFront / viewSpaceVol << " p: " << pOverall / viewSpaceVol << endl 
    14851488                  << "old rc: " << normalizedOldRenderCost << " new rc: " << newRenderCost / viewSpaceVol << endl 
    14861489                  << "render cost decrease: " << renderCostDecrease << endl; 
    1487 #endif 
     1490//#endif 
    14881491        return renderCostDecrease; 
    14891492} 
     
    26812684 
    26822685        const int pvsSize = EvalPvsSize(rays); 
    2683         //Debug <<  "pvs size: " << (int)pvsSize << endl; 
    2684         //Debug <<  "rays size: " << (int)rays.size() << endl; 
    2685  
     2686         
     2687 
     2688        ////////// 
    26862689        //-- prepare view space partition 
     2690 
    26872691        const float prop = mBoundingBox.GetVolume(); 
    26882692         
     
    26962700        // create first view cell 
    26972701        CreateViewCell(vData, false); 
    2698                  
     2702 
    26992703#if WORK_WITH_VIEWCELL_PVS 
    27002704        // add first view cell to all the objects view cell pvs 
     
    27092713#endif 
    27102714 
    2711         //-- compute first split candidate 
     2715        ////////////// 
     2716        //-- create the first split candidate 
    27122717 
    27132718        VspSubdivisionCandidate *splitCandidate = new VspSubdivisionCandidate(vData); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.cpp

    r1420 r1421  
    234234                //-- load data as single triangles instead of whole meshes 
    235235 
    236                 //cout << "m";   
     236                cout << "m";     
    237237                Mesh tempMesh(*mCurrentMesh); 
    238238                ApplyTransformations(mTransformations, &tempMesh); 
     
    590590  
    591591  if (element == "Shape") { 
    592           //cout << "+";  
     592          cout << "+";  
    593593 
    594594          // reset current shape values 
     
    603603  } 
    604604 
    605   // todo 
     605  // todo: materials don't work proberly yet 
    606606  if (element == "Material") { 
    607607          StartMaterial(attributes); 
Note: See TracChangeset for help on using the changeset viewer.