- Timestamp:
- 05/28/08 01:24:20 (16 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna
r2717 r2722 40 40 -preprocessor_detect_empty_viewspace+ \ 41 41 -preprocessor_use_vbos- \ 42 -preprocessor_ray_cast_method= 3\42 -preprocessor_ray_cast_method=1 \ 43 43 -view_cells_random_viewpoint_list=$VIEWPOINTS \ 44 44 demo1.env -
GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh
r2721 r2722 2 2 3 3 # add bin to path 4 export PATH=../bin: $PATH4 export PATH=../bin:../:$PATH 5 5 6 6 #TARGET=debug … … 14 14 SCENE=../data/Arena/arena_trees.obj 15 15 VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz 16 #SCENE=../data/vienna/vienna_cropped.obj 17 #SCENE=../data/roofs_new.obj 16 SCENE=../data/vienna/vienna_cropped.obj 18 17 #SCENE=../data/vienna/city_full_hp.obj 19 18 #SCENE=../data/vienna/vienna_rep.obj -
GTP/trunk/Lib/Vis/Preprocessing/src/GtpVisibility05.vcproj.UNKNOWN.matt.user
r2563 r2722 62 62 /> 63 63 </Configuration> 64 <Configuration 65 Name="Engine|Win32" 66 > 67 <DebugSettings 68 Command="" 69 WorkingDirectory="" 70 CommandArguments="" 71 Attach="false" 72 DebuggerType="3" 73 Remote="1" 74 RemoteMachine="UNKNOWN" 75 RemoteCommand="" 76 HttpUrl="" 77 PDBPath="" 78 SQLDebugging="" 79 Environment="" 80 EnvironmentMerge="true" 81 DebuggerFlavor="" 82 MPIRunCommand="" 83 MPIRunArguments="" 84 MPIRunWorkingDirectory="" 85 ApplicationCommand="" 86 ApplicationArguments="" 87 ShimCommand="" 88 MPIAcceptMode="" 89 MPIAcceptFilter="" 90 /> 91 </Configuration> 64 92 </Configurations> 65 93 </VisualStudioUserFile> -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2720 r2722 1698 1698 float Preprocessor::_HackComputeRenderCost(ViewCell *vc) 1699 1699 { 1700 ObjectPvs basePvs; 1701 1702 basePvs = vc->CopyPvs(); 1703 ObjectPvsIterator pit = basePvs.GetIterator(); 1700 ObjectPvsIterator pit = vc->GetPvs().GetIterator(); 1704 1701 1705 1702 float renderCost = 0; 1706 1703 int i = 0; 1704 cout<<"size: " << vc->GetPvs().GetSize() << endl; 1707 1705 // first mark all objects from this pvs 1708 1706 while (pit.HasMoreEntries()) 1709 1707 { 1710 1708 Intersectable *obj = pit.Next(); 1711 1712 1709 if (obj->Type() == Intersectable::KD_INTERSECTABLE) 1713 1710 { 1714 KdIntersectable *kdObj = static_cast<KdIntersectable *>( pit.Next());1711 KdIntersectable *kdObj = static_cast<KdIntersectable *>(obj); 1715 1712 1716 1713 /*if (mShowDistanceWeightedPvs) … … 1756 1753 int maxPlanes = 0; 1757 1754 int allEntries = 0; 1755 1756 int viewCells = 0; 1757 1758 1758 // now search for pvss which contained any mailed node 1759 for (vit = mViewCellsManager->GetViewCells().begin(); vit != vit_end; ++ vit) { 1759 for (vit = mViewCellsManager->GetViewCells().begin(); vit != vit_end; ++ vit) 1760 { 1760 1761 ObjectPvs &pvs = (*vit)->GetPvs(); 1761 if (Overlap(box, (*vit)->GetBox())) { 1762 1763 bool pvsChanged = false; 1764 1765 if (Overlap(box, (*vit)->GetBox())) 1766 { 1762 1767 pvs.Clear(); 1763 1768 removedEntries += pvs.GetSize(); 1764 } else { 1769 pvsChanged = true; 1770 } 1771 else 1772 { 1765 1773 // cout<<(*vit)->GetBox()<<" "<<box<<endl; 1766 1774 shadowVolume.Init((*vit)->GetBox(), box); … … 1769 1777 1770 1778 int j = 0; 1771 for (int i=0; i < pvs.mEntries.size(); i++) { 1779 for (int i=0; i < pvs.mEntries.size(); i++) 1780 { 1772 1781 allEntries++; 1773 1782 Intersectable *o = pvs.mEntries[i].mObject; 1774 if (o == inter) { 1783 if (o == inter) 1784 { 1775 1785 removedSelfEntries++; 1776 } else { 1777 if (!shadowVolume.TestIsInsideShaft(o->GetBox())) { 1786 pvsChanged = true; 1787 } 1788 else 1789 { 1790 if (!shadowVolume.TestIsInsideShaft(o->GetBox())) 1791 { 1778 1792 if (j != i) 1779 1793 pvs.mEntries[j] = pvs.mEntries[i]; 1780 1794 j++; 1781 } else { 1795 } 1796 else 1797 { 1782 1798 removedEntries++; 1799 pvsChanged = true; 1783 1800 } 1784 1801 } 1785 1802 } 1803 1786 1804 // now the pvs has to be resorted 1787 1805 pvs.mLastSorted = 0; 1788 1806 if (j==0) 1789 1807 pvs.mEntries.clear(); 1790 else { 1808 else 1809 { 1791 1810 pvs.mEntries.resize(j); 1792 1811 if (j>1) … … 1795 1814 } 1796 1815 1797 ViewCell *vc = *vit; 1798 1799 // recompute render cost 1800 float renderCost = _HackComputeRenderCost(vc); 1801 vc->GetPvs().mStats.mWeightedTriangles = renderCost; 1816 if (pvsChanged) 1817 { 1818 ViewCell *vc = *vit; 1819 1820 // recompute render cost 1821 float renderCost = _HackComputeRenderCost(vc); 1822 vc->GetPvs().mStats.mWeightedTriangles = renderCost; 1823 } 1802 1824 } 1803 1825 1804 1826 cerr<<"Number of removed pvs entries = "<<removedEntries<<" ("<< 1805 1827 100.0f*removedEntries/(float)allEntries<<"%)"<<endl;
Note: See TracChangeset
for help on using the changeset viewer.