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

Revision 1457, 1.6 KB checked in by bittner, 18 years ago (diff)

thread updates

  • 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
11PreprocessorThread::PreprocessorThread(Preprocessor *p):
12mPreprocessor(p)
13{
14}
15
16
17PreprocessorThread::~PreprocessorThread()
18{
19}
20
21void
22PreprocessorThread::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
60
61/*PreprocessorThread *PreprocessorThreadFactory::Create(const int threadType)
62{
63        return NULL;
64}*/
65
66}
Note: See TracBrowser for help on using the repository browser.