Changeset 1314 for GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
- Timestamp:
- 09/03/06 03:13:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1313 r1314 619 619 float volBack = volLeft; 620 620 float volFront = volRight; 621 622 621 float newRenderCost = nTotalObjects * totalVol; 623 622 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 624 642 625 643 ///////////////////////////// … … 647 665 volRight * (float)nObjectsRight; 648 666 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 649 686 if (sum < newRenderCost) 650 687 { … … 675 712 const float ratio = newRenderCost / oldRenderCost; 676 713 714 #ifdef _DEBUG 677 715 Debug << "\n§§§§ eval local cost §§§§" << endl 678 716 << "back pvs: " << (int)objectsBack.size() << " front pvs: " << (int)objectsFront.size() << " total pvs: " << nTotalObjects << endl … … 680 718 << "old rc: " << oldRenderCost / viewSpaceVol << " new rc: " << newRenderCost / viewSpaceVol << endl 681 719 << "render cost decrease: " << oldRenderCost / viewSpaceVol - newRenderCost / viewSpaceVol << endl; 720 #endif 682 721 683 722 return ratio;
Note: See TracChangeset
for help on using the changeset viewer.