Ignore:
Timestamp:
09/03/06 03:13:29 (18 years ago)
Author:
mattausch
Message:

started osp mesh construction for obj files. Introduced new primitive faceintersectable

File:
1 edited

Legend:

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

    r1313 r1314  
    619619        float volBack = volLeft; 
    620620        float volFront = volRight; 
    621  
    622621        float newRenderCost = nTotalObjects * totalVol; 
    623622 
     623#ifdef _DEBUG 
     624        const int leaves = mBvhStats.Leaves(); 
     625        const bool printStats = ((axis == 0) && (leaves > 0) && (leaves < 90)); 
     626         
     627        ofstream sumStats; 
     628        ofstream vollStats; 
     629        ofstream volrStats; 
     630 
     631        if (printStats) 
     632        { 
     633                char str[64];    
     634                sprintf(str, "tmp/bvh_heur_sum-%04d.log", leaves); 
     635                sumStats.open(str); 
     636                sprintf(str, "tmp/bvh_heur_voll-%04d.log", leaves); 
     637                vollStats.open(str); 
     638                sprintf(str, "tmp/bvh_heur_volr-%04d.log", leaves); 
     639                volrStats.open(str); 
     640        } 
     641#endif 
    624642 
    625643        ///////////////////////////// 
     
    647665                                                  volRight * (float)nObjectsRight; 
    648666 
     667#ifdef _DEBUG 
     668                 
     669                if (printStats) 
     670                { 
     671                        sumStats 
     672                                << "#Position\n" << nObjectsRight << endl 
     673                                << "#Sum\n" << sum / viewSpaceVol << endl 
     674                                << "#Vol\n" << (volLeft +  volRight) / viewSpaceVol << endl; 
     675 
     676                        vollStats 
     677                                << "#Position\n" << nObjectsRight << endl 
     678                                << "#Vol\n" << volLeft / viewSpaceVol << endl; 
     679 
     680                        volrStats 
     681                                << "#Position\n" << nObjectsRight << endl 
     682                                << "#Vol\n" << volRight / viewSpaceVol << endl; 
     683                } 
     684#endif 
     685 
    649686                if (sum < newRenderCost) 
    650687                { 
     
    675712        const float ratio = newRenderCost / oldRenderCost; 
    676713 
     714#ifdef _DEBUG 
    677715        Debug << "\n§§§§ eval local cost §§§§" << endl 
    678716                  << "back pvs: " << (int)objectsBack.size() << " front pvs: " << (int)objectsFront.size() << " total pvs: " << nTotalObjects << endl  
     
    680718                  << "old rc: " << oldRenderCost / viewSpaceVol << " new rc: " << newRenderCost / viewSpaceVol << endl 
    681719                  << "render cost decrease: " << oldRenderCost / viewSpaceVol - newRenderCost / viewSpaceVol << endl; 
     720#endif 
    682721 
    683722        return ratio; 
Note: See TracChangeset for help on using the changeset viewer.