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

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

worked on preprocessor with and without qt and threads

  • Property svn:executable set to *
RevLine 
[492]1#include "PreprocessorThread.h"
[1457]2#include "Camera.h"
3#include "KdTree.h"
4#include "SceneGraph.h"
5#include "Preprocessor.h"
[492]6
7
[863]8namespace GtpVisibilityPreprocessor {
[492]9
[860]10
[1867]11vector<PreprocessorThread *> PreprocessorThread::sThreads;
12
[1145]13PreprocessorThread::PreprocessorThread(Preprocessor *p):
14mPreprocessor(p)
[492]15{
[1145]16}
[556]17
[878]18
[556]19PreprocessorThread::~PreprocessorThread()
20{
21}
[860]22
[1457]23void
24PreprocessorThread::Main()
25{
26  Camera camera;
27 
[1583]28  if (0)
[1457]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));
[1154]36
[1457]37                camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
38        }
39 
[1583]40  if (0) {
[1457]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
[1583]46  if (0) {
[1457]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.