Changeset 520 for trunk/VUT/GtpVisibilityPreprocessor/src
- Timestamp:
- 01/12/06 02:44:17 (18 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
r518 r520 249 249 //-- parse view cells construction method 250 250 environment->GetBoolValue("ViewCells.loadFromFile", mLoadViewCells); 251 252 251 char buf[100]; 252 if (mLoadViewCells) 253 { 254 environment->GetStringValue("ViewCells.filename", buf); 255 mViewCellsFilename = buf; 256 } 253 257 if (mUseGlRenderer) 254 258 renderer = new GlRendererBuffer(1024, 768, mSceneGraph, mViewCellsManager); -
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.h
r518 r520 128 128 bool mLoadViewCells; 129 129 130 string mViewCellsFilename; 131 130 132 protected: 131 133 -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
r503 r520 83 83 } 84 84 85 85 86 float ViewCell::GetArea() const 86 87 { -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h
r503 r520 157 157 if ((int)mLeaves.size() > vcStat.maxLeaves) 158 158 vcStat.maxLeaves = (int)mLeaves.size(); 159 vcStat.leaves += (int)mLeaves.size(); 159 160 } 160 161 -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r519 r520 100 100 void ViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays) 101 101 { 102 Debug << "here2" << endl;103 102 // view cells not yet constructed 104 103 if (!ViewCellsConstructed()) 105 104 return; 106 Debug << "here " << rays.size() << endl;107 105 108 106 VssRayContainer::const_iterator it, it_end = rays.end(); … … 335 333 mViewCellsStats.Reset(); 336 334 EvaluateViewCellsStats(); 337 335 // has to be recomputed 338 336 mTotalAreaValid = false; 339 337 } … … 361 359 termination, 362 360 viewcells); 363 Debug << "constribution: " << (int)viewcells.size() << endl;361 //Debug << "constribution: " << (int)viewcells.size() << endl; 364 362 // copy viewcells memory efficiently 365 363 const bool storeViewcells = false; … … 1965 1963 return 0; 1966 1964 } 1967 // view cells already finished 1968 else if (mViewCellsFinished) 1965 1966 EvaluateViewCellsStats(); 1967 1968 // view cells already finished post processing step 1969 if (mViewCellsFinished) 1969 1970 return 0; 1970 1971 … … 1973 1974 1974 1975 Debug << "post processing using " << (int)postProcessRays.size() << " samples" << endl; 1975 EvaluateViewCellsStats();1976 1976 1977 Debug << "\nview cell partition after sampling:\n" << mViewCellsStats << endl << endl; 1977 1978 … … 1983 1984 // collapse sibling leaves that share the same view cell 1984 1985 mVspBspTree->CollapseTree(); 1986 1987 ResetViewCells(); 1985 1988 1986 1989 // real meshes are only contructed only at this stage … … 2372 2375 2373 2376 bool success = parser.ParseFile(filename, mVspBspTree, this, objects); 2377 mVspBspTree->RepairViewCellsLeafLists(); 2378 mVspBspTree->mBox = GetViewSpaceBox(); 2374 2379 ResetViewCells(); 2375 2380 CreateViewCellMeshes(); -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h
r517 r520 35 35 { 36 36 friend class ViewCellsParseHandlers; 37 37 friend class VspBspViewCellsManager; 38 38 public: 39 39 -
trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
r518 r520 403 403 404 404 //-- load view cells from file if requested 405 // load now because otherwise bounding box is messed up 405 406 if (mLoadViewCells) 406 407 { 407 char buff[100]; 408 environment->GetStringValue("ViewCells.filename", buff); 409 string vcFilename(buff); 410 mViewCellsManager->LoadViewCells(vcFilename, &mObjects); 408 mViewCellsManager->LoadViewCells(mViewCellsFilename, &mObjects); 411 409 } 412 410 … … 639 637 //-- render simulation after merge 640 638 cout << "\nevaluating bsp view cells render time after merge ... "; 641 642 639 mRenderSimulator->RenderScene(); 643 644 640 SimulationStatistics ss; 645 641 mRenderSimulator->GetStatistics(ss);
Note: See TracChangeset
for help on using the changeset viewer.