Changeset 2713 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 05/26/08 14:54:07 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r2708 r2713 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: so 24. V 23:11:1020083 # Generated by qmake (2.00a) (Qt 4.1.2) on: po 26. V 10:26:06 2008 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 63 63 $(MAKE) -f $(MAKEFILE).Debug uninstall 64 64 65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc .net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 66 66 C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 67 67 C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ -
GTP/trunk/Lib/Vis/Preprocessing/src/MutualVisibility.cpp
r2601 r2713 703 703 const float solidAngleThreshold) 704 704 { 705 706 707 708 709 710 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 1701 1701 Intersectable *inter = leaf->GetIntersectable(); 1702 1702 int removedEntries = 0; 1703 int removedSelfEntries = 0; 1703 1704 CSeparatingAxisTester shadowVolume; 1704 1705 int maxPlanes = 0; 1706 int allEntries = 0; 1705 1707 // now search for pvss which contained any mailed node 1706 1708 for (vit = mViewCellsManager->GetViewCells().begin(); vit != vit_end; ++ vit) { … … 1710 1712 removedEntries += pvs.GetSize(); 1711 1713 } else { 1712 1713 1714 // cout<<(*vit)->GetBox()<<" "<<box<<endl; 1714 1715 shadowVolume.Init((*vit)->GetBox(), box); 1716 if (shadowVolume.CntPlanes() > maxPlanes) 1717 maxPlanes = shadowVolume.CntPlanes(); 1715 1718 1716 1719 int j = 0; 1717 1720 for (int i=0; i < pvs.mEntries.size(); i++) { 1721 allEntries++; 1718 1722 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++; 1724 1725 } 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 } 1726 1733 } 1727 1734 } 1735 // now the pvs has to be resorted 1728 1736 pvs.mLastSorted = 0; 1729 1737 if (j==0) … … 1731 1739 else { 1732 1740 pvs.mEntries.resize(j); 1733 pvs.SimpleSort(); 1741 if (j>1) 1742 pvs.SimpleSort(); 1734 1743 } 1735 1744 } 1736 1745 } 1737 1746 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; 1739 1751 // cout<<"Cleared "<<pvsCounter<<" PVSs ("<<mViewCellsManager->GetViewCells().size()/ 1740 1752 // (float)pvsCounter*100.0f<<"%) "<<endl; … … 1755 1767 // delete ALL dynamic stuff and rebuild using the new trafos 1756 1768 preprocessor->mRayCaster->DeleteDynamicObjects(); 1757 1769 1770 1771 1758 1772 for (size_t i = 0; i < mDynamicObjects.size(); ++ i) 1759 1773 { 1760 1774 SceneGraphLeaf *l = mDynamicObjects[i]; 1761 1775 1762 UpdateObjectInRayCaster(l);1776 1763 1777 1764 1778 if (l->HasChanged()) 1765 1779 { 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); 1770 1786 } 1771 1787 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
r2707 r2713 56 56 void VerbosePvs<T, S>::SimpleSort() 57 57 { 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; 63 60 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; 66 66 } 67 67 -
GTP/trunk/Lib/Vis/Preprocessing/src/SepPlanesBox3.h
r2708 r2713 25 25 // the number of separating planes 26 26 int cntPlanes; 27 Plane3 planes[ 180];27 Plane3 planes[32]; 28 28 AxisAlignedBox3 origBox; 29 29 AxisAlignedBox3 shadBox; -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r2708 r2713 44 44 totalSamples 250000000 45 45 # totalSamples 2000000 46 samplesPerPass 10000046 samplesPerPass 300000 47 47 samplesPerEvaluation 5000000 48 48 … … 521 521 522 522 BSP { 523 termCrit auto523 # termCrit auto 524 524 # termCrit auto2 525 #termCrit adhoc525 termCrit adhoc 526 526 # For Arena 527 527 #maxDepthAllowed 15 528 528 #maxListLength 8 529 529 # For Vienna 530 #maxDepthAllowed 22531 #maxListLength 6530 maxDepthAllowed 22 531 maxListLength 6 532 532 # For Powerplant 533 533 # maxDepthAllowed 27 … … 557 557 # rayCastMethod 0 558 558 # Intel 559 rayCastMethod 1559 # rayCastMethod 1 560 560 # Havran - 2 - static scene 561 561 # rayCastMethod 2 562 562 # Havran - 3 - dynamic scene 563 #rayCastMethod 3563 rayCastMethod 3 564 564 565 565 loadMeshes false -
GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
r2708 r2713 4 4 5 5 #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"6 COMMAND="../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" 7 7 8 8 #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.