Changeset 2662 for GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
- Timestamp:
- 04/28/08 18:59:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
r2648 r2662 846 846 { 847 847 mViewCells.push_back((*vit)->first); 848 849 if (mViewCells.size() >= mMaxViewCells) 850 break; 848 851 } 849 850 return; 851 } 852 853 while ((int)mViewCells.size() < mMaxViewCells) 854 { 855 if (0) 852 } 853 else 854 { 855 while ((int)mViewCells.size() < mMaxViewCells) 856 856 { 857 mViewCells.push_back(mViewCellsManager->GetViewCell((int)mViewCells.size())); 858 continue; 859 } 860 861 // HACK 862 const int tries = 10000; 863 int i = 0; 864 865 for (i = 0; i < tries; ++ i) 866 { 867 const int idx = (int)RandomValue(0.0f, (float)mViewCellsManager->GetNumViewCells() - 0.5f); 868 869 ViewCell *viewCell = mViewCellsManager->GetViewCell(idx); 870 871 if (!viewCell->Mailed()) 857 if (0) 872 858 { 873 viewCell->Mail(); 859 mViewCells.push_back(mViewCellsManager->GetViewCell((int)mViewCells.size())); 860 continue; 861 } 862 863 // HACK 864 const int tries = 10000; 865 int i = 0; 866 867 for (i = 0; i < tries; ++ i) 868 { 869 const int idx = (int)RandomValue(0.0f, (float)mViewCellsManager->GetNumViewCells() - 0.5f); 870 871 ViewCell *viewCell = mViewCellsManager->GetViewCell(idx); 872 873 if (!viewCell->Mailed()) 874 { 875 viewCell->Mail(); 876 break; 877 } 878 879 mViewCells.push_back(viewCell); 880 } 881 882 if (i == tries) 883 { 884 cerr << "big error! no view cell found" << endl; 874 885 break; 875 886 } 876 877 mViewCells.push_back(viewCell);878 887 } 879 880 if (i == tries) 881 { 882 cerr << "big error! no view cell found" << endl; 883 return; 884 } 885 } 888 } 889 890 cout << "\ncomputing list of " << mViewCells.size() << " view cells" << endl; 886 891 } 887 892 … … 1114 1119 cout << "finished view cell construction" << endl; 1115 1120 } 1116 #if 01117 else1118 {1119 //-- test successful view cells loading by exporting them again1120 VssRayContainer dummies;1121 mViewCellsManager->Visualize(mObjects, dummies);1122 mViewCellsManager->ExportViewCells("test.xml.gz", mViewCellsManager->GetExportPvs(), mObjects);1123 }1124 #endif1125 1121 1126 1122 if (mPerViewCell)
Note: See TracChangeset
for help on using the changeset viewer.