- Timestamp:
- 01/23/07 04:39:45 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp
r2021 r2023 14 14 #include "RayCaster.h" 15 15 16 #include "PerfTimer.h"16 //#include "PerfTimer.h" 17 17 18 18 19 19 namespace GtpVisibilityPreprocessor { 20 20 21 extern PerfTimer viewCellCastTimer;22 extern PerfTimer pvsTimer;23 extern PerfTimer objTimer;21 //extern PerfTimer viewCellCastTimer; 22 //extern PerfTimer pvsTimer; 23 //extern PerfTimer objTimer; 24 24 25 25 const bool pruneInvalidRays = true; … … 94 94 mMixtureDistribution->ComputeContributions(vssRays); 95 95 96 cout<<"view cell cast time:"<<viewCellCastTimer.TotalTime()<<" s"<<endl;97 cout<<"pvs time:"<<pvsTimer.TotalTime()<<" s"<<endl;98 cout<<"obj time:"<<objTimer.TotalTime()<<" s"<<endl;96 //cout<<"view cell cast time:"<<viewCellCastTimer.TotalTime()<<" s"<<endl; 97 //cout<<"pvs time:"<<pvsTimer.TotalTime()<<" s"<<endl; 98 //cout<<"obj time:"<<objTimer.TotalTime()<<" s"<<endl; 99 99 100 100 if (mExportRays) { -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r2017 r2023 349 349 { 350 350 Vector3 target = mViewPoint + mViewDirection; 351 351 //cout << "vp: " << mViewPoint << " dr: " << mViewDirection << endl; 352 //cout<<"box: " << mKdTree->GetBox()<<endl; 352 353 Vector3 up(0,1,0); 353 354 … … 859 860 GlRendererBuffer::EvalPvsStat() 860 861 { 861 862 cout<<"here15"<<endl; 862 863 MakeCurrent(); 863 864 … … 865 866 866 867 DoneCurrent(); 867 868 cout<<"here185"<<endl; 868 869 // mRenderingFinished.wakeAll(); 869 870 } … … 1289 1290 } 1290 1291 1292 bool GlRendererBuffer::ValidViewPoint() 1293 { cout << "here49" << endl; 1294 /*MakeCurrent(); 1295 1296 bool result = GlRenderer::ValidViewPoint(); 1297 DoneCurrent(); 1298 */bool result = true; 1299 return result; 1300 } 1301 1291 1302 1292 1303 void 1293 1304 GlRenderer::EvalPvsStat() 1294 1305 { 1295 1306 cout <<"here3399"<<endl; 1296 1307 mPvsStat.Reset(); 1297 1308 halton.Reset(); … … 1375 1386 glCullFace(GL_BACK); 1376 1387 1377 // 1388 //cout<<"VV1 "; 1378 1389 RenderScene(); 1379 1390 … … 1405 1416 1406 1417 if (pixelCount > 0) 1418 {cout<<"count: " << pixelCount<<endl; 1407 1419 return false; // backfacing polygon found -> not a valid viewspace sample 1408 1420 } 1409 1421 return true; 1410 1422 } -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h
r2017 r2023 145 145 SetupProjection(const int w, const int h, const float angle = 70.0f); 146 146 147 virtual bool 148 ValidViewPoint(); 147 virtual bool ValidViewPoint(); 149 148 150 149 virtual float … … 280 279 virtual void DoneCurrent() = 0; 281 280 281 virtual bool ValidViewPoint(); 282 282 283 283 virtual void SampleBeamContributions( -
GTP/trunk/Lib/Vis/Preprocessing/src/OcclusionQuery.cpp
r2002 r2023 102 102 if (sUseArbQueries) 103 103 { 104 // GLint sampleCount;105 104 glGetQueryObjectuivARB(mId, GL_QUERY_RESULT_ARB, &sampleCount); 106 105 return sampleCount; -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2021 r2023 1194 1194 } 1195 1195 1196 // reserve constant block of rays 1196 1197 mRayCaster->ReserveVssRayPool(2*mSamplesPerPass); 1197 1198 … … 1212 1213 #if 1 1213 1214 mRayCaster->SortRays(rays); 1214 cout<<"Rays sorted in "<<TimeDiff(t1, GetTime())<<" ms."<<endl;1215 //cout<<"Rays sorted in "<<TimeDiff(t1, GetTime())<<" ms."<<endl; 1215 1216 1216 1217 if (0) { -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
r2017 r2023 222 222 OptimizeForWindowsApplication="TRUE" 223 223 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";"$(CG_INC_PATH)"" 224 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT "224 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_CG" 225 225 ExceptionHandling="TRUE" 226 226 RuntimeLibrary="2" -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r2019 r2023 7 7 #include "RssTree.h" 8 8 #include "Mutation.h" 9 #include "PerfTimer.h"9 //#include "PerfTimer.h" 10 10 11 11 namespace GtpVisibilityPreprocessor { 12 12 13 extern PerfTimer pvsTimer;13 //extern PerfTimer pvsTimer; 14 14 15 15 //HaltonSequence SamplingStrategy::sHalton; … … 662 662 if (strcmp(curr, "mutation")==0) { 663 663 // temp matt: still no mutationstrategy! 664 mDistributions.push_back(new MutationBasedDistribution(mPreprocessor));664 //mDistributions.push_back(new MutationBasedDistribution(mPreprocessor)); 665 665 } 666 666 -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r2017 r2023 196 196 OptimizeForWindowsApplication="TRUE" 197 197 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include";QtInterface" 198 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT "198 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG" 199 199 RuntimeLibrary="2" 200 200 EnableEnhancedInstructionSet="2" … … 314 314 OptimizeForWindowsApplication="TRUE" 315 315 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include";QtInterface" 316 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_QT ;TRY_GLOBAL_LINES"316 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_QT" 317 317 RuntimeLibrary="2" 318 318 RuntimeTypeInfo="TRUE" -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2021 r2023 25 25 #include "SceneGraph.h" 26 26 27 #include "PerfTimer.h"27 //#include "PerfTimer.h" 28 28 29 29 … … 39 39 40 40 41 PerfTimer viewCellCastTimer;42 PerfTimer pvsTimer;43 PerfTimer objTimer;41 //PerfTimer viewCellCastTimer; 42 //PerfTimer pvsTimer; 43 //PerfTimer objTimer; 44 44 45 45 // HACK … … 510 510 mPreprocessor->GetRenderer()->mViewPoint = viewPoint; 511 511 mPreprocessor->GetRenderer()->mViewDirection = direction; 512 513 if (mPreprocessor->GetRenderer()->ValidViewPoint()) 512 //preprocessor->renderer->EvalPvsStat(); 513 cout<<"*********hgere55"<<endl; 514 if (preprocessor->renderer->ValidViewPoint()) 514 515 { 515 516 cout << "view point valid" << endl; 516 517 break; 517 518 } 519 cout<<"here33"<<endl; 518 520 } 519 521 … … 1999 2001 } 2000 2002 2001 cout<<"view cell cast time:"<<viewCellCastTimer.TotalTime()<<" s"<<endl;2002 cout<<"pvs time:"<<pvsTimer.TotalTime()<<" s"<<endl;2003 //cout<<"view cell cast time:"<<viewCellCastTimer.TotalTime()<<" s"<<endl; 2004 // cout<<"pvs time:"<<pvsTimer.TotalTime()<<" s"<<endl; 2003 2005 2004 2006 return sum; … … 2698 2700 ViewCell::NewMail(); 2699 2701 2700 viewCellCastTimer.Entry();2702 //viewCellCastTimer.Entry(); 2701 2703 2702 2704 static ViewCellContainer viewCells; … … 2712 2714 } 2713 2715 2714 viewCellCastTimer.Exit();2716 //viewCellCastTimer.Exit(); 2715 2717 2716 2718 mSamplesStat.mViewCells += (int)viewCells.size(); … … 2738 2740 // objTimer.Exit(); 2739 2741 2740 pvsTimer.Entry();2742 //pvsTimer.Entry(); 2741 2743 2742 2744 ViewCellContainer::const_iterator it = viewCells.begin(); … … 2751 2753 } 2752 2754 2753 pvsTimer.Exit();2755 //pvsTimer.Exit(); 2754 2756 2755 2757 mSamplesStat.mPvsContributions += ray.mPvsContribution; -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r2020 r2023 175 175 176 176 InitTiming(); 177 Debug.open("debug.log"); 178 177 179 #if 0 178 Debug.open("debug.log");179 180 180 cout<<"Allocating 1.5GB..."<<endl; 181 181 … … 192 192 } 193 193 #endif 194 194 195 Environment::GetSingleton()->Parse(argc, argv, USE_EXE_PATH); 195 196 MeshKdTree::ParseEnvironment(); … … 205 206 exit(1); 206 207 } 208 207 209 208 210 Environment::GetSingleton()->GetStringValue("Scene.filename", buff); … … 283 285 } 284 286 285 const string viewCellsFile = ReplaceSuffix(filename, ".obj", ".vc"); 286 const int numViewCells = 2; 287 const int numViewPoints = 2; 287 string viewCellsFile = ReplaceSuffix(filename, ".obj", ".vc"); 288 viewCellsFile = ReplaceSuffix(filename, ".dat", ".vc"); 289 290 const int numViewCells = 5; 291 const int numViewPoints = 20; 288 292 289 293 bool useHwGlobalLines; … … 361 365 Environment::GetSingleton()->GetIntValue("Preprocessor.pvsRenderErrorSamples", frames); 362 366 363 if ( frames)367 if (1)//frames) 364 368 { 365 369 // NOTE: render texture should be power of 2 and square … … 373 377 } 374 378 375 /*vector<ViewCellPoints *> myViewCells;379 vector<ViewCellPoints *> myViewCells; 376 380 377 381 preprocessor->mViewCellsManager->GenerateRandomViewCells(myViewCells, numViewCells, numViewPoints); … … 381 385 //preprocessor->mViewCellsManager->ImportRandomViewCells(viewCellsFile, myViewCells); 382 386 CLEAR_CONTAINER(myViewCells); 383 */ 387 388 //preprocessor->renderer->EvalPvsStat(); 389 384 390 qApp->exec(); 385 391 #endif
Note: See TracChangeset
for help on using the changeset viewer.