Revision 162,
1.0 KB
checked in by bittner, 19 years ago
(diff) |
functional raycasting version
|
Line | |
---|
1 | #include "SamplingPreprocessor.h"
|
---|
2 | #include "ExactPreprocessor.h"
|
---|
3 | #include "Parser.h"
|
---|
4 | #include "UnigraphicsParser.h"
|
---|
5 | #include "Environment.h"
|
---|
6 | #include "Camera.h"
|
---|
7 |
|
---|
8 | #define USE_EXE_PATH false
|
---|
9 |
|
---|
10 |
|
---|
11 | int
|
---|
12 | main(int argc, const char **argv)
|
---|
13 | {
|
---|
14 | Debug.open("debug.log");
|
---|
15 | environment = new Environment;
|
---|
16 | environment->Parse(argc, argv, USE_EXE_PATH);
|
---|
17 |
|
---|
18 | Preprocessor *p =
|
---|
19 | new SamplingPreprocessor();
|
---|
20 |
|
---|
21 | p->LoadScene("soda.dat");
|
---|
22 | p->BuildKdTree();
|
---|
23 | p->KdTreeStatistics(cout);
|
---|
24 |
|
---|
25 | // p->mSceneGraph->Export("soda.x3d");
|
---|
26 | p->Export("soda.x3d", true, false);
|
---|
27 | p->Export("soda-kdtree.x3d", false, true);
|
---|
28 |
|
---|
29 | // p->LoadViewcells("viewcells.wrl");
|
---|
30 | p->ComputeVisibility();
|
---|
31 | p->ExportPreprocessedData("scene.vis");
|
---|
32 |
|
---|
33 | Camera camera;
|
---|
34 | camera.LookAtBox(p->mKdTree->GetBox());
|
---|
35 | camera.SnapImage("camera.png", p->mKdTree);
|
---|
36 |
|
---|
37 | camera.LookInBox(p->mKdTree->GetBox());
|
---|
38 | camera.SetPosition(camera.mPosition - Vector3(0,100,0));
|
---|
39 | camera.SnapImage("camera2.png", p->mKdTree);
|
---|
40 |
|
---|
41 | return 0;
|
---|
42 | }
|
---|
43 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.