[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] | 8 | namespace GtpVisibilityPreprocessor {
|
---|
[492] | 9 |
|
---|
[860] | 10 |
|
---|
[1145] | 11 | PreprocessorThread::PreprocessorThread(Preprocessor *p):
|
---|
| 12 | mPreprocessor(p)
|
---|
[492] | 13 | {
|
---|
[1145] | 14 | }
|
---|
[556] | 15 |
|
---|
[878] | 16 |
|
---|
[556] | 17 | PreprocessorThread::~PreprocessorThread()
|
---|
| 18 | {
|
---|
| 19 | }
|
---|
[860] | 20 |
|
---|
[1457] | 21 | void
|
---|
| 22 | PreprocessorThread::Main()
|
---|
| 23 | {
|
---|
| 24 | Camera camera;
|
---|
| 25 |
|
---|
[1583] | 26 | if (0)
|
---|
[1457] | 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));
|
---|
[1154] | 34 |
|
---|
[1457] | 35 | camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
|
---|
| 36 | }
|
---|
| 37 |
|
---|
[1583] | 38 | if (0) {
|
---|
[1457] | 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 |
|
---|
[1583] | 44 | if (0) {
|
---|
[1457] | 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 |
|
---|
[1154] | 61 | /*PreprocessorThread *PreprocessorThreadFactory::Create(const int threadType)
|
---|
| 62 | {
|
---|
| 63 | return NULL;
|
---|
| 64 | }*/
|
---|
| 65 |
|
---|
[1457] | 66 | }
|
---|