Changeset 1457 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 09/21/06 23:08:59 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.cpp
r1404 r1457 21 21 22 22 23 void BoostPreprocessorThread::Main()24 {25 Camera camera;26 27 if (0)28 {29 // camera.LookAtBox(mPreprocessor->mKdTree->GetBox());30 // camera.LookInBox(mPreprocessor->mKdTree->GetBox());31 camera.SetPosition(Vector3(3473, 6.778f, -1699.0f));32 camera.SetDirection(Vector3(-0.2432f, 0, 0.97f));33 // camera.SetPosition(Vector3(991.7, 187.8, -271));34 // camera.SetDirection(Vector3(0.9, 0, -0.4));35 36 camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);37 }38 39 if (0) {40 camera.LookInBox(mPreprocessor->mKdTree->GetBox());41 camera.SetPosition(camera.mPosition + Vector3(-250,0,-550));42 camera.SnapImage("camera2.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);43 }44 45 if (0) {46 camera.SetPosition( mPreprocessor->mKdTree->GetBox().Center() - Vector3(0,-100,0) );47 camera.SetDirection(Vector3(1, 0, 0));48 camera.SnapImage("camera3.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);49 }50 51 if (mPreprocessor->mComputeVisibility) {52 mPreprocessor->ComputeVisibility();53 // mPreprocessor->ExportPreprocessedData("scene.vis");54 mPreprocessor->PostProcessVisibility();55 }56 57 cerr << "Preprocessor main finished...\n";58 59 }60 23 61 24 -
GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.h
r1146 r1457 22 22 virtual void RunThread(); 23 23 24 virtual void Main();25 24 26 25 void operator()(); -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r1454 r1457 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 21. IX 2 0:46:4420063 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 21. IX 22:34:57 2006 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 71 71 C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf \ 72 72 C:\Qt\4.1.2\mkspecs\features\default_post.prf \ 73 C:\Qt\4.1.2\mkspecs\features\qt.prf \ 74 C:\Qt\4.1.2\mkspecs\features\win32\opengl.prf \ 75 C:\Qt\4.1.2\mkspecs\features\moc.prf \ 73 76 C:\Qt\4.1.2\mkspecs\features\win32\thread.prf \ 74 77 C:\Qt\4.1.2\mkspecs\features\warn_off.prf \ … … 89 92 C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf: 90 93 C:\Qt\4.1.2\mkspecs\features\default_post.prf: 94 C:\Qt\4.1.2\mkspecs\features\qt.prf: 95 C:\Qt\4.1.2\mkspecs\features\win32\opengl.prf: 96 C:\Qt\4.1.2\mkspecs\features\moc.prf: 91 97 C:\Qt\4.1.2\mkspecs\features\win32\thread.prf: 92 98 C:\Qt\4.1.2\mkspecs\features\warn_off.prf: … … 110 116 distclean: release-distclean debug-distclean FORCE 111 117 -$(DEL_FILE) Makefile 118 119 release-mocclean: $(MAKEFILE).Release 120 $(MAKE) -f $(MAKEFILE).Release mocclean 121 debug-mocclean: $(MAKEFILE).Debug 122 $(MAKE) -f $(MAKEFILE).Debug mocclean 123 mocclean: release-mocclean debug-mocclean 124 125 release-mocables: $(MAKEFILE).Release 126 $(MAKE) -f $(MAKEFILE).Release mocables 127 debug-mocables: $(MAKEFILE).Debug 128 $(MAKE) -f $(MAKEFILE).Debug mocables 129 mocables: release-mocables debug-mocables 112 130 FORCE: 113 131 -
GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp
r1159 r1457 1 1 #include "PreprocessorThread.h" 2 #include "Camera.h" 3 #include "KdTree.h" 4 #include "SceneGraph.h" 5 #include "Preprocessor.h" 2 6 3 7 … … 15 19 } 16 20 21 void 22 PreprocessorThread::Main() 23 { 24 Camera camera; 25 26 if (0) 27 { 28 // camera.LookAtBox(mPreprocessor->mKdTree->GetBox()); 29 // camera.LookInBox(mPreprocessor->mKdTree->GetBox()); 30 camera.SetPosition(Vector3(3473, 6.778f, -1699.0f)); 31 camera.SetDirection(Vector3(-0.2432f, 0, 0.97f)); 32 // camera.SetPosition(Vector3(991.7, 187.8, -271)); 33 // camera.SetDirection(Vector3(0.9, 0, -0.4)); 34 35 camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph); 36 } 37 38 if (0) { 39 camera.LookInBox(mPreprocessor->mKdTree->GetBox()); 40 camera.SetPosition(camera.mPosition + Vector3(-250,0,-550)); 41 camera.SnapImage("camera2.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph); 42 } 43 44 if (0) { 45 camera.SetPosition( mPreprocessor->mKdTree->GetBox().Center() - Vector3(0,-100,0) ); 46 camera.SetDirection(Vector3(1, 0, 0)); 47 camera.SnapImage("camera3.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph); 48 } 49 50 if (mPreprocessor->mComputeVisibility) { 51 mPreprocessor->ComputeVisibility(); 52 // mPreprocessor->ExportPreprocessedData("scene.vis"); 53 mPreprocessor->PostProcessVisibility(); 54 } 55 56 cerr << "Preprocessor main finished...\n"; 57 58 } 59 17 60 18 61 /*PreprocessorThread *PreprocessorThreadFactory::Create(const int threadType) -
GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.h
r1387 r1457 16 16 virtual ~PreprocessorThread(); 17 17 18 virtual void InitThread() = 0; 19 virtual void RunThread() = 0; 20 21 virtual void Main() = 0; 18 virtual void InitThread() {} 19 virtual void RunThread() {} 20 21 virtual void Main(); 22 22 23 protected: 23 24 -
GTP/trunk/Lib/Vis/Preprocessing/src/QtPreprocessorThread.cpp
r1387 r1457 20 20 } 21 21 22 void23 QtPreprocessorThread::Main()24 {25 26 Camera camera;27 28 if (0)29 {30 // camera.LookAtBox(mPreprocessor->mKdTree->GetBox());31 // camera.LookInBox(mPreprocessor->mKdTree->GetBox());32 camera.SetPosition(Vector3(3473, 6.778f, -1699.0f));33 camera.SetDirection(Vector3(-0.2432f, 0, 0.97f));34 // camera.SetPosition(Vector3(991.7, 187.8, -271));35 // camera.SetDirection(Vector3(0.9, 0, -0.4));36 37 camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);38 }39 40 if (0) {41 camera.LookInBox(mPreprocessor->mKdTree->GetBox());42 camera.SetPosition(camera.mPosition + Vector3(-250,0,-550));43 camera.SnapImage("camera2.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);44 }45 46 if (0) {47 camera.SetPosition( mPreprocessor->mKdTree->GetBox().Center() - Vector3(0,-100,0) );48 camera.SetDirection(Vector3(1, 0, 0));49 camera.SnapImage("camera3.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);50 }51 52 if (mPreprocessor->mComputeVisibility) {53 mPreprocessor->ComputeVisibility();54 // mPreprocessor->ExportPreprocessedData("scene.vis");55 mPreprocessor->PostProcessVisibility();56 }57 58 cerr << "Preprocessor main finished...\n";59 60 61 }62 22 63 23 QtPreprocessorThread::~QtPreprocessorThread() -
GTP/trunk/Lib/Vis/Preprocessing/src/QtPreprocessorThread.h
r1387 r1457 16 16 ~QtPreprocessorThread(); 17 17 18 void Main();19 18 void InitThread() {} 20 19 void RunThread() { -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r1454 r1457 2 2 //#define USE_QT 0 3 3 #endif 4 //#define USE_QT 0 5 #define USE_THREADS 1 4 5 #define USE_QT 0 6 #if USE_QT 7 #define USE_BOOST 0 8 #else 9 #define USE_BOOST 0 10 #endif 6 11 7 12 #ifdef UNICODE … … 27 32 #include "SceneGraph.h" 28 33 29 #if USE_THREADS && !USE_QT 34 #include "PreprocessorThread.h" 35 #if USE_BOOST 30 36 #include "BoostPreprocessorThread.h" 31 37 #endif … … 209 215 // create a preprocessor thread (note: capsulates calls to boost fuctions!) 210 216 //PreprocessorThread *pt = PreprocessorThreadFactory::Create(preprocessor); 211 #if USE_THREADS212 217 PreprocessorThread *pt; 213 218 … … 215 220 pt = new QtPreprocessorThread(preprocessor); 216 221 #else 222 #if USE_BOOST 217 223 pt = new BoostPreprocessorThread(preprocessor); 218 #endif 224 #else 225 pt = new PreprocessorThread(preprocessor); 226 #endif 219 227 #endif 220 228 … … 225 233 cout << "using gl widget" << endl; 226 234 // create and run the preprocessor application in a parallel thread 235 #if USE_QT 227 236 #if USE_THREADS 228 237 pt->InitThread(); … … 230 239 #endif 231 240 232 #if USE_QT233 241 // display the render widget 234 242 if (!rendererWidget) … … 264 272 if (!(preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger)) { 265 273 // just call the mail method -> will be executed in the main thread 266 #if USE_THREADS267 274 pt->Main(); 268 #endif269 275 } 270 276 -
GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
r1454 r1457 1 1 CONFIG -= qt debug 2 CONFIG += console warn_off thread release 3 #mlrt qt 2 CONFIG += console warn_off thread release mlrt qt 4 3 5 4 TEMPLATE = app
Note: See TracChangeset
for help on using the changeset viewer.