Changeset 1843 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 12/04/06 22:34:15 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1842 r1843 562 562 disposeRays(postProcessSamples, outRays); 563 563 564 565 // write view cells to disc566 if (mExportViewCells)567 {568 char filename[100];569 Environment::GetSingleton()->GetStringValue("ViewCells.filename", filename);570 ExportViewCells(filename, mExportPvs, mPreprocessor->mObjects);571 }572 564 573 565 //////////////// … … 610 602 // recalculate view cells 611 603 EvaluateViewCellsStats(); 604 605 if (1) CompressViewCells(); 606 607 // write view cells to disc 608 if (mExportViewCells) 609 { 610 char filename[100]; 611 Environment::GetSingleton()->GetStringValue("ViewCells.filename", filename); 612 ExportViewCells(filename, mExportPvs, mPreprocessor->mObjects); 613 } 612 614 613 615 return numSamples; … … 1626 1628 { 1627 1629 return viewCell->GetVolume(); 1630 } 1631 1632 1633 void ViewCellsManager::CompressViewCells() 1634 { 1635 //////////// 1636 //-- compression 1637 1638 if (ViewCellsTreeConstructed() && mCompressViewCells) 1639 { 1640 int pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 1641 1642 cout << "number of entries before compress: " << pvsEntries << endl; 1643 Debug << "number of entries before compress: " << pvsEntries << endl; 1644 1645 mViewCellsTree->SetViewCellsStorage(ViewCellsTree::COMPRESSED); 1646 1647 pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 1648 1649 Debug << "number of entries after compress: " << pvsEntries << endl; 1650 cout << "number of entries after compress: " << pvsEntries << endl; 1651 } 1628 1652 } 1629 1653 … … 4582 4606 4583 4607 4584 //////////// 4585 //-- compression 4586 4587 if (ViewCellsTreeConstructed() && mCompressViewCells) 4588 { 4589 int pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 4590 4591 cout << "number of entries before compress: " << pvsEntries << endl; 4592 Debug << "number of entries before compress: " << pvsEntries << endl; 4593 4594 mViewCellsTree->SetViewCellsStorage(ViewCellsTree::COMPRESSED); 4595 4596 pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 4597 4598 Debug << "number of entries after compress: " << pvsEntries << endl; 4599 cout << "number of entries after compress: " << pvsEntries << endl; 4600 } 4601 4608 if (0) CompressViewCells(); 4609 4602 4610 // collapse sibling leaves that share the same view cell 4603 4611 if (0) mVspBspTree->CollapseTree(); … … 5500 5508 5501 5509 5510 mHierarchyManager->CreateUniqueObjectIds(); 5511 5502 5512 /////////// 5503 5513 //-- compression 5504 5514 5505 if (ViewCellsTreeConstructed() && mCompressViewCells) 5506 { 5507 int pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 5508 5509 cout << "number of entries before compress: " << pvsEntries << endl; 5510 Debug << "number of entries before compress: " << pvsEntries << endl; 5511 5512 mViewCellsTree->SetViewCellsStorage(ViewCellsTree::COMPRESSED); 5513 5514 pvsEntries = mViewCellsTree->CountStoredPvsEntries(mViewCellsTree->GetRoot()); 5515 5516 Debug << "number of entries after compress: " << pvsEntries << endl; 5517 cout << "number of entries after compress: " << pvsEntries << endl; 5518 } 5515 if (0) CompressViewCells(); 5519 5516 5520 5517 ///////////// … … 5924 5921 stream << "<VisibilitySolution>" << endl; 5925 5922 5926 if (exportPvs) 5923 // §§ tmp matt: for storage cost 5924 if (0 && exportPvs) 5927 5925 { 5928 5926 /////////////// … … 6227 6225 evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 6228 6226 evalStrats.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 6229 6230 Debug << "casting volume strategies" << endl;6231 cout << "casting volume strategies" << endl;6232 6227 } 6233 6228 else … … 6238 6233 //evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 6239 6234 //evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 6240 6241 Debug << "casting surface strategies" << endl;6242 cout << "casting surface strategies" << endl;6243 6235 } 6244 6236 … … 6247 6239 Debug << evalStrats[i] << " "; 6248 6240 Debug << endl; 6241 6242 cout << "casting eval strategies: "; 6243 for (int i = 0; i < (int)evalStrats.size(); ++ i) 6244 cout << evalStrats[i] << " "; 6245 cout << endl; 6249 6246 6250 6247 while (castSamples < numSamples)
Note: See TracChangeset
for help on using the changeset viewer.