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 *
RevLine 
[492]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
[863]10namespace GtpVisibilityPreprocessor {
[492]11
[860]12
[492]13PreprocessorThread::PreprocessorThread(Preprocessor *p,
14                                                                           QObject *parent):QThread(parent)
15{
16  mPreprocessor = p;
[599]17  if (p->mQuitOnFinish)
18        connect(this, SIGNAL(finished()), qApp, SLOT(closeAllWindows(void)));
[492]19}
20
21void
22PreprocessorThread::Main()
23{
[685]24 
[492]25  Camera camera;
[556]26
[492]27  if (0) {
[878]28        // camera.LookAtBox(mPreprocessor->mKdTree->GetBox());
29         //     camera.LookInBox(mPreprocessor->mKdTree->GetBox());
[576]30        camera.SetPosition(Vector3(3473, 6.778, -1699));
31        camera.SetDirection(Vector3(-0.2432, 0, 0.97));
[878]32        //      camera.SetPosition(Vector3(991.7, 187.8, -271));
33        //      camera.SetDirection(Vector3(0.9, 0, -0.4));
34
[492]35    camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
[878]36  }
37
[492]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
[878]50  if (mPreprocessor->mComputeVisibility) {
51    mPreprocessor->ComputeVisibility();
52        //      mPreprocessor->ExportPreprocessedData("scene.vis");
53        mPreprocessor->PostProcessVisibility();
54  }
55 
[556]56
[878]57
[712]58  cerr << "Preprocessor main finished...\n";
[492]59 
60}
[556]61
62PreprocessorThread::~PreprocessorThread()
63{
64  cerr<<"Preprocessor thread destructor...\n";
65}
[860]66
[878]67}
Note: See TracBrowser for help on using the repository browser.