Changeset 2713


Ignore:
Timestamp:
05/26/08 14:54:07 (16 years ago)
Author:
bittner
Message:

updates changes

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r2708 r2713  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: so 24. V 23:11:10 2008 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: po 26. V 10:26:06 2008 
    44# Project:  preprocessor.pro 
    55# Template: app 
     
    6363        $(MAKE) -f $(MAKEFILE).Debug uninstall 
    6464 
    65 Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
     65Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
    6666                C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 
    6767                C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/MutualVisibility.cpp

    r2601 r2713  
    703703                                         const float solidAngleThreshold) 
    704704{ 
    705         MutualVisibilitySampler 
    706                 sampler(sceneGraph, kdTree, source, target, solidAngleThreshold); 
    707  
    708         int visibility = sampler.ComputeVisibility(); 
    709  
    710         return visibility; 
    711  
    712 } 
    713  
    714 } 
     705  MutualVisibilitySampler 
     706        sampler(sceneGraph, kdTree, source, target, solidAngleThreshold); 
     707   
     708  int visibility = sampler.ComputeVisibility(); 
     709   
     710  return visibility; 
     711   
     712} 
     713 
     714} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2710 r2713  
    17011701  Intersectable *inter = leaf->GetIntersectable(); 
    17021702  int removedEntries = 0; 
     1703  int removedSelfEntries = 0; 
    17031704  CSeparatingAxisTester shadowVolume; 
    1704  
     1705  int maxPlanes = 0; 
     1706  int allEntries = 0; 
    17051707  // now search for pvss which contained any mailed node 
    17061708  for (vit = mViewCellsManager->GetViewCells().begin(); vit != vit_end; ++ vit) { 
     
    17101712          removedEntries += pvs.GetSize(); 
    17111713        } else { 
    1712            
    17131714          //    cout<<(*vit)->GetBox()<<" "<<box<<endl; 
    17141715          shadowVolume.Init((*vit)->GetBox(), box); 
     1716          if (shadowVolume.CntPlanes() > maxPlanes) 
     1717                maxPlanes = shadowVolume.CntPlanes(); 
    17151718           
    17161719          int j = 0; 
    17171720          for (int i=0; i < pvs.mEntries.size(); i++) { 
     1721                allEntries++; 
    17181722                Intersectable *o = pvs.mEntries[i].mObject; 
    1719                  
    1720                 if (!shadowVolume.TestIsInsideShaft(o->GetBox())) { 
    1721                   if (j != i) 
    1722                         pvs.mEntries[j] = pvs.mEntries[i]; 
    1723                   j++; 
     1723                if (o == inter) { 
     1724                  removedSelfEntries++; 
    17241725                } else { 
    1725                   removedEntries++; 
     1726                  if (!shadowVolume.TestIsInsideShaft(o->GetBox())) { 
     1727                        if (j != i) 
     1728                          pvs.mEntries[j] = pvs.mEntries[i]; 
     1729                        j++; 
     1730                  } else { 
     1731                        removedEntries++; 
     1732                  } 
    17261733                } 
    17271734          } 
     1735          // now the pvs has to be resorted 
    17281736          pvs.mLastSorted = 0; 
    17291737          if (j==0) 
     
    17311739          else { 
    17321740                pvs.mEntries.resize(j); 
    1733                 pvs.SimpleSort(); 
     1741                if (j>1) 
     1742                  pvs.SimpleSort(); 
    17341743          } 
    17351744        } 
    17361745  } 
    17371746   
    1738   cerr<<"Number of removed pvs entries = "<<removedEntries<<endl; 
     1747  cerr<<"Number of removed pvs entries = "<<removedEntries<<" ("<< 
     1748        100.0f*removedEntries/(float)allEntries<<"%)"<<endl; 
     1749  cerr<<"Number of removed pvs self-entries = "<<removedSelfEntries<<endl; 
     1750  cerr<<"Max shadow planes used:"<<maxPlanes<<endl; 
    17391751  //    cout<<"Cleared "<<pvsCounter<<" PVSs ("<<mViewCellsManager->GetViewCells().size()/ 
    17401752  //      (float)pvsCounter*100.0f<<"%) "<<endl; 
     
    17551767                // delete ALL dynamic stuff and rebuild using the new trafos 
    17561768                preprocessor->mRayCaster->DeleteDynamicObjects(); 
    1757          
     1769 
     1770                 
     1771 
    17581772                for (size_t i = 0; i < mDynamicObjects.size(); ++ i)  
    17591773                { 
    17601774                        SceneGraphLeaf *l = mDynamicObjects[i]; 
    17611775 
    1762                         UpdateObjectInRayCaster(l); 
     1776                         
    17631777 
    17641778                        if (l->HasChanged()) 
    17651779                        { 
    1766                                 cout<<"Updating affected PVSs..."<<endl; 
    1767                                 preprocessor->ObjectMoved(l); 
    1768                                 cout<<"done."<<endl;     
    1769                                 l->SetHasChanged(false); 
     1780                          UpdateObjectInRayCaster(l); 
     1781                           
     1782                          cout<<"Updating affected PVSs..."<<endl; 
     1783                          preprocessor->ObjectMoved(l); 
     1784                          cout<<"done."<<endl;   
     1785                          l->SetHasChanged(false); 
    17701786                        } 
    17711787                } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h

    r2707 r2713  
    5656void VerbosePvs<T, S>::SimpleSort() 
    5757{ 
    58         //  sort(mEntries.begin(), mEntries.end()); 
    59         typename vector<PvsEntry<T, S> >::iterator it = mEntries.begin() + mLastSorted; 
    60  
    61         sort(it, mEntries.end()); 
    62         inplace_merge(mEntries.begin(), it, mEntries.end()); 
     58  //  sort(mEntries.begin(), mEntries.end()); 
     59  typename vector<PvsEntry<T, S> >::iterator it = mEntries.begin() + mLastSorted; 
    6360   
    64         mLastSorted = (int)mEntries.size(); 
    65         mQueriesSinceSort = 0; 
     61  sort(it, mEntries.end()); 
     62  inplace_merge(mEntries.begin(), it, mEntries.end()); 
     63   
     64  mLastSorted = (int)mEntries.size(); 
     65  mQueriesSinceSort = 0; 
    6666} 
    6767 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SepPlanesBox3.h

    r2708 r2713  
    2525  // the number of separating planes 
    2626  int cntPlanes; 
    27   Plane3 planes[180]; 
     27  Plane3 planes[32]; 
    2828  AxisAlignedBox3 origBox; 
    2929  AxisAlignedBox3 shadBox; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r2708 r2713  
    4444        totalSamples 250000000 
    4545#       totalSamples 2000000 
    46         samplesPerPass 100000 
     46        samplesPerPass 300000 
    4747        samplesPerEvaluation 5000000 
    4848 
     
    521521 
    522522BSP { 
    523   termCrit       auto 
     523  # termCrit      auto 
    524524  # termCrit      auto2 
    525   # termCrit      adhoc 
     525  termCrit       adhoc 
    526526  # For Arena 
    527527  #maxDepthAllowed 15 
    528528  #maxListLength    8 
    529529  # For Vienna 
    530   # maxDepthAllowed 22 
    531   # maxListLength    6 
     530  maxDepthAllowed 22 
     531  maxListLength    6 
    532532  # For Powerplant 
    533533  # maxDepthAllowed  27 
     
    557557  # rayCastMethod 0 
    558558  # Intel 
    559   rayCastMethod 1 
     559  # rayCastMethod 1 
    560560  # Havran - 2 - static scene 
    561561  # rayCastMethod 2 
    562562  # Havran - 3 - dynamic scene 
    563   # rayCastMethod 3 
     563  rayCastMethod 3 
    564564 
    565565  loadMeshes false 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test2

    r2708 r2713  
    44 
    55#COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 
    6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=100000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=1400" 
     6COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=300000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=1400" 
    77 
    88#SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" 
Note: See TracChangeset for help on using the changeset viewer.