Changeset 1887
- Timestamp:
- 12/13/06 17:34:43 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r1877 r1887 1544 1544 "false"); 1545 1545 1546 1546 RegisterOption("ViewCells.compressObjects", 1547 optBool, 1548 "view_cells_compress_objects=", 1549 "false"); 1550 1547 1551 1548 1552 /****************************************************************************/ -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
r1766 r1887 267 267 OptimizeForWindowsApplication="TRUE" 268 268 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include"" 269 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL "269 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;NO_QT" 270 270 ExceptionHandling="TRUE" 271 271 RuntimeLibrary="2" -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1883 r1887 5085 5085 5086 5086 5087 /************************************************************************ **/5088 /* 5089 /************************************************************************ **/5087 /************************************************************************/ 5088 /* VspOspViewCellsManager implementation */ 5089 /************************************************************************/ 5090 5090 5091 5091 … … 5096 5096 Environment::GetSingleton()->GetIntValue("Hierarchy.Construction.samples", mInitialSamples); 5097 5097 5098 Environment::GetSingleton()->GetBoolValue("ViewCells.compressObjects", mCompressObjects); 5099 5100 Debug << "compressing objects: " << mCompressObjects << endl; 5101 cout << "compressing objects: " << mCompressObjects << endl; 5102 5098 5103 mHierarchyManager = CreateHierarchyManager(hierarchyType); 5099 5104 mHierarchyManager->SetViewCellsManager(this); … … 5105 5110 : ViewCellsManager(vcTree), mHierarchyManager(hm) 5106 5111 { 5112 //cout<<"here4"<<endl; 5107 5113 Environment::GetSingleton()->GetIntValue("Hierarchy.Construction.samples", mInitialSamples); 5114 Environment::GetSingleton()->GetBoolValue("ViewCells.compressObjects", mCompressObjects); 5115 5116 Debug << "compressing objects: " << mCompressObjects << endl; 5117 cout << "compressing objects: " << mCompressObjects << endl; 5108 5118 5109 5119 mHierarchyManager->SetViewCellsManager(this); … … 5599 5609 mViewCells[i] : mViewCells[(int)RandomValue(0, (float)mViewCells.size() - 1)]; 5600 5610 5601 if (vc->Mailed()) // already used5611 if (vc->Mailed()) // view cell already processed 5602 5612 continue; 5603 5613 … … 5857 5867 void VspOspViewCellsManager::CompressViewCells() 5858 5868 { 5859 //ViewCellsManager::CompressViewCells(); 5860 //return; 5869 if (!mCompressObjects) 5870 { 5871 cout << "compressing in the view space" << endl; 5872 Debug << "compressing in the view space" << endl; 5873 ViewCellsManager::CompressViewCells(); 5874 return; 5875 } 5876 5861 5877 //////////// 5862 5878 //-- compression … … 5867 5883 5868 5884 cout << "compressing in the objects" << endl; 5885 Debug << "compressing in the objects" << endl; 5869 5886 float mem = (float)pvsEntries * ObjectPvs::GetEntrySize(); 5870 5887 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1877 r1887 1186 1186 //void ExportStats(const string &mergeStats); 1187 1187 1188 /** collect objects intersecting a given spatial box 1189 */ 1190 virtual void CollectObjects(const AxisAlignedBox3 &box, ObjectContainer &objects); 1191 1192 1188 1193 ///////////////////////////////////////// 1189 1194 1190 /** collect objects intersecting a given spatial box 1191 */ 1192 virtual void CollectObjects(const AxisAlignedBox3 &box, ObjectContainer &objects); 1195 1196 bool mCompressObjects; 1193 1197 1194 1198 HierarchyManager *mHierarchyManager; -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r1867 r1887 48 48 using namespace GtpVisibilityPreprocessor; 49 49 50 Preprocessor *preprocessor = NULL; 50 51 GlRendererWidget *rendererWidget = NULL; 51 52 … … 211 212 if (preprocessor->InitRayCast(externKdTree, internKdTree)) 212 213 { 213 cout << "ray casting initialized! " << endl;214 cout << "ray casting initialized! here6" << endl; 214 215 } 215 216 else … … 247 248 } 248 249 249 250 cout<<"here34"<<endl; 250 251 // parse view cells related options 251 252 if (!preprocessor->PrepareViewCells()) … … 264 265 //PreprocessorThread *pt = PreprocessorThreadFactory::Create(preprocessor); 265 266 PreprocessorThread *pt; 266 267 #if USE_QT 267 cout << "here8"<<endl; 268 269 #if 0//USE_QT 268 270 // create a qt application first (must be created before any opengl widget ...) 269 271 QApplication *app = new QApplication(argc, NULL); … … 278 280 #endif 279 281 280 preprocessor->SetThread(pt);281 282 282 bool guiSupported = false; 283 283 … … 286 286 cout << "using gl widget" << endl; 287 287 // create and run the preprocessor application in a parallel thread 288 #if USE_QT288 #if 0//USE_QT 289 289 #if USE_THREADS 290 290 pt->InitThread(); … … 304 304 305 305 rendererWidget = new QtGlRendererWidget(preprocessor->mSceneGraph, 306 307 306 preprocessor->mViewCellsManager, 307 preprocessor->mKdTree); 308 308 309 309 //((QtGlRendererWidget *)rendererWidget)->SetThread((QtPreprocessorThread *)pt); 310 310 rendererWidget->Show(); 311 311 312 313 314 315 316 312 QtGlViewer *viewer = new QtGlViewer(NULL, 313 (QtGlRendererWidget *) 314 rendererWidget); 315 viewer->show(); 316 guiSupported = true; 317 317 } 318 318 … … 325 325 preprocessor->renderer = 326 326 new QtGlRendererBuffer(512, 512, 327 328 329 327 preprocessor->mSceneGraph, 328 preprocessor->mViewCellsManager, 329 preprocessor->mKdTree); 330 330 // preprocessor->Getrenderer->makeCurrent(); 331 331 }
Note: See TracChangeset
for help on using the changeset viewer.