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

Revision 878, 1.7 KB checked in by bittner, 18 years ago (diff)

mesh inntersection bug fixed

  • Property svn:executable set to *
Line 
1#include <QApplication>
2
3#include "PreprocessorThread.h"
4#include "Camera.h"
5#include "KdTree.h"
6#include "SceneGraph.h"
7#include "Preprocessor.h"
8
9
10namespace GtpVisibilityPreprocessor {
11
12
13PreprocessorThread::PreprocessorThread(Preprocessor *p,
14                                                                           QObject *parent):QThread(parent)
15{
16  mPreprocessor = p;
17  if (p->mQuitOnFinish)
18        connect(this, SIGNAL(finished()), qApp, SLOT(closeAllWindows(void)));
19}
20
21void
22PreprocessorThread::Main()
23{
24 
25  Camera camera;
26
27  if (0) {
28        // camera.LookAtBox(mPreprocessor->mKdTree->GetBox());
29         //     camera.LookInBox(mPreprocessor->mKdTree->GetBox());
30        camera.SetPosition(Vector3(3473, 6.778, -1699));
31        camera.SetDirection(Vector3(-0.2432, 0, 0.97));
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
57
58  cerr << "Preprocessor main finished...\n";
59 
60}
61
62PreprocessorThread::~PreprocessorThread()
63{
64  cerr<<"Preprocessor thread destructor...\n";
65}
66
67}
Note: See TracBrowser for help on using the repository browser.