#include "SamplingPreprocessor.h" #include "ExactPreprocessor.h" #include "Parser.h" #include "UnigraphicsParser.h" #include "Environment.h" #include "Camera.h" #define USE_EXE_PATH false int main(int argc, const char **argv) { Debug.open("debug.log"); environment = new Environment; environment->Parse(argc, argv, USE_EXE_PATH); Preprocessor *p = new SamplingPreprocessor(); p->LoadScene("soda.dat"); p->BuildKdTree(); p->KdTreeStatistics(cout); // p->mSceneGraph->Export("soda.x3d"); p->Export("soda.x3d", true, false); p->Export("soda-kdtree.x3d", false, true); // p->LoadViewcells("viewcells.wrl"); p->ComputeVisibility(); p->ExportPreprocessedData("scene.vis"); Camera camera; camera.LookAtBox(p->mKdTree->GetBox()); camera.SnapImage("camera.png", p->mKdTree); camera.LookInBox(p->mKdTree->GetBox()); camera.SetPosition(camera.mPosition - Vector3(0,100,0)); camera.SnapImage("camera2.png", p->mKdTree); return 0; }