source: GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp @ 1926

Revision 1926, 1.5 KB checked in by mattausch, 17 years ago (diff)

worked on preprocessor with and without qt and threads

  • Property svn:executable set to *
Line 
1#include "PreprocessorThread.h"
2#include "Camera.h"
3#include "KdTree.h"
4#include "SceneGraph.h"
5#include "Preprocessor.h"
6
7
8namespace GtpVisibilityPreprocessor {
9
10
11vector<PreprocessorThread *> PreprocessorThread::sThreads;
12
13PreprocessorThread::PreprocessorThread(Preprocessor *p):
14mPreprocessor(p)
15{
16}
17
18
19PreprocessorThread::~PreprocessorThread()
20{
21}
22
23void
24PreprocessorThread::Main()
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
63}
Note: See TracBrowser for help on using the repository browser.