Ignore:
Timestamp:
10/19/06 20:30:21 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
4 edited

Legend:

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

    r1649 r1654  
    10691069        const float ratio = newRenderCost / oldRenderCost; 
    10701070 
    1071 //#ifdef _DEBUG 
     1071#ifdef _DEBUG 
    10721072        Debug << "\n§§§§ bvh eval const decrease §§§§" << endl 
    10731073                  << "back pvs: " << (int)objectsBack.size() << " front pvs: " << (int)objectsFront.size() << " total pvs: " << nTotalObjects << endl  
     
    10751075                  << "old rc: " << oldRenderCost / viewSpaceVol << " new rc: " << newRenderCost / viewSpaceVol << endl 
    10761076                  << "render cost decrease: " << oldRenderCost / viewSpaceVol - newRenderCost / viewSpaceVol << endl; 
    1077 //#endif 
     1077#endif 
    10781078 
    10791079        return ratio; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1653 r1654  
    252252                                                mHierarchyStats.mPvsEntries, 
    253253                                                memoryCost, 
    254                                                 1.0f / (mHierarchyStats.mTotalCost * memoryCost) 
     254                                                1.0f / (mHierarchyStats.mTotalCost * memoryCost), 
     255                                                (float)mVspTree->mVspStats.Leaves() / (float)GetObjectSpaceSubdivisionLeaves() 
    255256                                                ); 
    256257} 
     
    262263                                                                                   const int pvsEntries, 
    263264                                                                                   const float memory, 
    264                                                                                    const float renderCostPerStorage) 
     265                                                                                   const float renderCostPerStorage, 
     266                                                                                   const float vspOspRatio) 
    265267{ 
    266268        mSubdivisionStats 
     
    270272                        << "#TotalRenderCost\n" << totalRenderCost << endl 
    271273                        << "#Memory\n" << memory << endl 
    272                         << "#RcPerMb\n" << renderCostPerStorage << endl; 
     274                        << "#RcPerMb\n" << renderCostPerStorage << endl 
     275                        << "#VspOspRatio\n" << vspOspRatio << endl; 
    273276} 
    274277 
     
    696699        mHierarchyStats.mRenderCostDecrease = sc->GetRenderCostDecrease(); 
    697700 
     701        static float memoryCount = 0; 
     702 
     703        if (mHierarchyStats.mMemory > memoryCount) 
     704        { 
     705                memoryCount += 100000; 
     706                cout << "\nstorage cost: " << mHierarchyStats.mMemory / (1024.0f * 1024.0f) << ", steps: " << mHierarchyStats.Leaves() << endl; 
     707        } 
     708 
    698709        // output stats 
    699710        EvalSubdivisionStats(); 
     
    878889                        !(steps < minSteps)) 
    879890                { 
    880                         cout << "breaking on " << sc->GetRenderCostDecrease() << " smaller than " << minRenderCostDecr << endl; 
     891                        //cout << "breaking on " << sc->GetRenderCostDecrease() << " smaller than " << minRenderCostDecr << endl; 
    881892                        break; 
    882893                } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r1649 r1654  
    315315                                                         const int totalPvsEntries,  
    316316                                                         const float memory, 
    317                                                          const float renderCostPerStorage); 
     317                                                         const float renderCostPerStorage, 
     318                                                         const float vspOspRatio); 
    318319 
    319320        bool AddSampleToPvs(Intersectable *obj,  
     
    376377        /** After the suddivision has ended, do some final tasks. 
    377378        */ 
    378         void FinishObjectSpaceSubdivision(const ObjectContainer &objects, const bool removeRayRefs = true) const; 
     379        void FinishObjectSpaceSubdivision(const ObjectContainer &objects,  
     380                                                                          const bool removeRayRefs = true) const; 
    379381 
    380382        /** Returns depth of object space subdivision. 
  • GTP/trunk/Lib/Vis/Preprocessing/src/OspTree.cpp

    r1633 r1654  
    715715                ratio = minRenderCost / totalRenderCost; 
    716716        } 
    717  
     717#if _DEBUG 
    718718        Debug << "\n§§§§ eval local cost §§§§" << endl 
    719719                  << "old rc: " << totalRenderCost / viewSpaceVol << " new rc: " << minRenderCost / viewSpaceVol << endl 
    720720                  << "render cost decrease: " << (totalRenderCost - minRenderCost) / viewSpaceVol  << endl; 
    721  
     721#endif 
    722722        return ratio; 
    723723} 
Note: See TracChangeset for help on using the changeset viewer.