- Timestamp:
- 01/18/06 23:35:50 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r547 r551 252 252 253 253 254 void ViewCellsManager::FinalizeViewCells(const bool createMesh) 255 { 256 ViewCellContainer::const_iterator it, it_end = mViewCells.end(); 257 for (it = mViewCells.begin(); it != it_end; ++ it) 258 { 259 Finalize(*it, createMesh); 260 } 261 } 262 263 264 void ViewCellsManager::Finalize(ViewCell *viewCell, const bool createMesh) 265 { 266 // implemented in subclasses 267 } 268 269 254 270 ViewCell *ViewCellsManager::MergeViewCells(ViewCell &front, ViewCell &back) const 255 271 { … … 1145 1161 void BspViewCellsManager::CreateMesh(ViewCell *vc) 1146 1162 { 1147 } 1148 1149 ViewCell * 1150 BspViewCellsManager::GetViewCell(const Vector3 &point) 1163 // TODO 1164 } 1165 1166 1167 ViewCell *BspViewCellsManager::GetViewCell(const Vector3 &point) 1151 1168 { 1152 1169 if (!mBspTree) … … 1445 1462 void KdViewCellsManager::CreateMesh(ViewCell *vc) 1446 1463 { 1464 // TODO 1447 1465 } 1448 1466 … … 1793 1811 void VspKdViewCellsManager::CreateMesh(ViewCell *vc) 1794 1812 { 1813 //TODO 1795 1814 } 1796 1815 … … 1816 1835 float VspBspViewCellsManager::GetProbability(ViewCell *viewCell) 1817 1836 { 1818 if ( mVspBspTree->mUseAreaForPvs)1837 if (0 && mVspBspTree->mUseAreaForPvs) 1819 1838 return GetArea(viewCell) / GetAccVcArea(); 1820 1839 else … … 1865 1884 VssRayContainer savedRays; 1866 1885 1886 Debug << "construction samples: " << mConstructionSamples << " rays: " << rays.size() << endl; 1867 1887 GetRaySets(rays, mConstructionSamples, constructionRays, &savedRays); 1868 1888 … … 1973 1993 if (exporter) 1974 1994 { 1975 //exporter->SetWireframe(); 1976 exporter->SetFilled(); 1995 if (1) 1996 exporter->SetWireframe(); 1997 else 1998 exporter->SetFilled(); 1977 1999 ExportViewCellsForViz(exporter); 1978 2000 … … 2031 2053 if (mViewCellsFinished) 2032 2054 { 2055 FinalizeViewCells(true); 2033 2056 EvaluateViewCellsStats(); 2034 2057 return 0; … … 2049 2072 2050 2073 2051 //-- merge the individual view cells: Should be done here because it makes 2074 if (1) 2075 { 2076 FinalizeViewCells(false); 2077 } 2078 2079 //-- merge the individual view cells 2052 2080 MergeViewCells(postProcessRays, objects); 2053 2081 //-- refines the merged view cells … … 2059 2087 2060 2088 // real meshes are only contructed only at this stage 2061 CreateViewCellMeshes(); 2089 //CreateViewCellMeshes(); 2090 FinalizeViewCells(true); 2062 2091 2063 2092 // write view cells to disc … … 2497 2526 return mVspBspTree->CastBeam(beam); 2498 2527 } 2528 2529 2530 void VspBspViewCellsManager::Finalize(ViewCell *viewCell) 2531 { 2532 BspViewCell *vc = dynamic_cast<BspViewCell *>(viewCell); 2533 CreateMesh(vc); 2534 2535 vector<BspLeaf *>::const_iterator it, it_end = vc->mLeaves.end(); 2536 2537 float area = 0; 2538 float volume = 0; 2539 2540 for (it = vc->mLeaves.begin(); it != it_end; ++ it) 2541 { 2542 BspNodeGeometry geom; 2543 BspLeaf *leaf = *it; 2544 mVspBspTree->ConstructGeometry(leaf, geom); 2545 2546 area += geom.GetArea(); 2547 volume += geom.GetVolume(); 2548 } 2549 2550 viewCell->SetVolume(volume); 2551 viewCell->SetArea(area); 2552 }
Note: See TracChangeset
for help on using the changeset viewer.