Changeset 2700 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 05/23/08 14:49:21 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r2699 r2700 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: pá 23. V 1 3:41:2820083 # Generated by qmake (2.00a) (Qt 4.1.2) on: pá 23. V 14:49:37 2008 4 4 # Project: preprocessor.pro 5 5 # Template: app … … 7 7 ############################################################################# 8 8 9 first: release10 install: release-install11 uninstall: release-uninstall9 first: debug 10 install: debug-install 11 uninstall: debug-uninstall 12 12 MAKEFILE = Makefile 13 13 QMAKE = qmake … … 27 27 MKDIR = mkdir 28 28 SUBTARGETS = \ 29 release\30 debug29 debug \ 30 release 31 31 32 debug: $(MAKEFILE).Debug FORCE 33 $(MAKE) -f $(MAKEFILE).Debug 34 debug-make_default: $(MAKEFILE).Debug FORCE 35 $(MAKE) -f $(MAKEFILE).Debug 36 debug-make_first: $(MAKEFILE).Debug FORCE 37 $(MAKE) -f $(MAKEFILE).Debug first 38 debug-all: $(MAKEFILE).Debug FORCE 39 $(MAKE) -f $(MAKEFILE).Debug all 40 debug-clean: $(MAKEFILE).Debug FORCE 41 $(MAKE) -f $(MAKEFILE).Debug clean 42 debug-distclean: $(MAKEFILE).Debug FORCE 43 $(MAKE) -f $(MAKEFILE).Debug distclean 44 debug-install: $(MAKEFILE).Debug FORCE 45 $(MAKE) -f $(MAKEFILE).Debug install 46 debug-uninstall: $(MAKEFILE).Debug FORCE 47 $(MAKE) -f $(MAKEFILE).Debug uninstall 32 48 release: $(MAKEFILE).Release FORCE 33 49 $(MAKE) -f $(MAKEFILE).Release … … 46 62 release-uninstall: $(MAKEFILE).Release FORCE 47 63 $(MAKE) -f $(MAKEFILE).Release uninstall 48 debug: $(MAKEFILE).Debug FORCE49 $(MAKE) -f $(MAKEFILE).Debug50 debug-make_default: $(MAKEFILE).Debug FORCE51 $(MAKE) -f $(MAKEFILE).Debug52 debug-make_first: $(MAKEFILE).Debug FORCE53 $(MAKE) -f $(MAKEFILE).Debug first54 debug-all: $(MAKEFILE).Debug FORCE55 $(MAKE) -f $(MAKEFILE).Debug all56 debug-clean: $(MAKEFILE).Debug FORCE57 $(MAKE) -f $(MAKEFILE).Debug clean58 debug-distclean: $(MAKEFILE).Debug FORCE59 $(MAKE) -f $(MAKEFILE).Debug distclean60 debug-install: $(MAKEFILE).Debug FORCE61 $(MAKE) -f $(MAKEFILE).Debug install62 debug-uninstall: $(MAKEFILE).Debug FORCE63 $(MAKE) -f $(MAKEFILE).Debug uninstall64 64 65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc .net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \65 Makefile: preprocessor.pro C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 66 66 C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 67 67 C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ 68 68 C:\Qt\4.1.2\mkspecs\features\default_pre.prf \ 69 69 C:\Qt\4.1.2\mkspecs\features\win32\default_pre.prf \ 70 C:\Qt\4.1.2\mkspecs\features\ release.prf \70 C:\Qt\4.1.2\mkspecs\features\debug.prf \ 71 71 C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf \ 72 72 C:\Qt\4.1.2\mkspecs\features\default_post.prf \ … … 89 89 C:\Qt\4.1.2\mkspecs\features\default_pre.prf: 90 90 C:\Qt\4.1.2\mkspecs\features\win32\default_pre.prf: 91 C:\Qt\4.1.2\mkspecs\features\ release.prf:91 C:\Qt\4.1.2\mkspecs\features\debug.prf: 92 92 C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf: 93 93 C:\Qt\4.1.2\mkspecs\features\default_post.prf: … … 109 109 qmake_all: FORCE 110 110 111 make_default: release-make_default debug-make_default FORCE112 make_first: release-make_first debug-make_first FORCE113 all: release-all debug-all FORCE114 clean: release-clean debug-clean FORCE111 make_default: debug-make_default release-make_default FORCE 112 make_first: debug-make_first release-make_first FORCE 113 all: debug-all release-all FORCE 114 clean: debug-clean release-clean FORCE 115 115 -$(DEL_FILE) "..\bin\release"\preprocessor.exp 116 distclean: release-distclean debug-distclean FORCE 116 -$(DEL_FILE) "..\bin\release"\preprocessor.pdb 117 -$(DEL_FILE) "..\bin\release"\preprocessor.ilk 118 -$(DEL_FILE) vc*.pdb 119 -$(DEL_FILE) vc*.idb 120 distclean: debug-distclean release-distclean FORCE 117 121 -$(DEL_FILE) Makefile 118 122 123 debug-mocclean: $(MAKEFILE).Debug 124 $(MAKE) -f $(MAKEFILE).Debug mocclean 119 125 release-mocclean: $(MAKEFILE).Release 120 126 $(MAKE) -f $(MAKEFILE).Release mocclean 121 debug-mocclean: $(MAKEFILE).Debug 122 $(MAKE) -f $(MAKEFILE).Debug mocclean 123 mocclean: release-mocclean debug-mocclean 127 mocclean: debug-mocclean release-mocclean 124 128 129 debug-mocables: $(MAKEFILE).Debug 130 $(MAKE) -f $(MAKEFILE).Debug mocables 125 131 release-mocables: $(MAKEFILE).Release 126 132 $(MAKE) -f $(MAKEFILE).Release mocables 127 debug-mocables: $(MAKEFILE).Debug 128 $(MAKE) -f $(MAKEFILE).Debug mocables 129 mocables: release-mocables debug-mocables 133 mocables: debug-mocables release-mocables 130 134 FORCE: 131 135 136 $(MAKEFILE).Debug: Makefile 132 137 $(MAKEFILE).Release: Makefile 133 $(MAKEFILE).Debug: Makefile -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2699 r2700 254 254 { 255 255 Triangle3 tri = static_cast<TriangleIntersectable *>(obj)->GetItem(); 256 //tri.mVertices[0] *= 10; tri.mVertices[1] *= 10; tri.mVertices[2] *= 10;257 256 258 257 samplesOut.write(reinterpret_cast<char *>(tri.mVertices + 0), sizeof(Vector3)); … … 527 526 cout << "finished loading" << endl; 528 527 } 529 528 530 529 return result; 531 530 } … … 663 662 cout << "loading objects from " << buf << endl; 664 663 665 // load scene objects which are the entitiesused as pvs entries664 // load scene objects used as pvs entries 666 665 ObjectContainer pvsObjects; 667 666 if (0) LoadObjects(buf, pvsObjects, mObjects); 668 667 669 const bool finalizeViewCells = false;668 const bool finalizeViewCells = true; 670 669 cout << "loading view cells from " << buf << endl; 671 670 … … 690 689 mViewCellsManager = CreateViewCellsManager(buf); 691 690 691 // default view space is the extent of the scene 692 AxisAlignedBox3 viewSpaceBox; 693 692 694 if (mUseViewSpaceBox) 693 695 { 694 // default view space is the extent of the scene 695 AxisAlignedBox3 viewSpaceBox = mSceneGraph->GetBox(); 696 viewSpaceBox = mSceneGraph->GetBox(); 696 697 697 698 // use a small box outside of the scene 698 699 viewSpaceBox.Scale(Vector3(0.15f, 0.3f, 0.5f)); 700 //viewSpaceBox.Translate(Vector3(Magnitude(mSceneGraph->GetBox().Size()) * 0.5f, 0, 0)); 699 701 viewSpaceBox.Translate(Vector3(Magnitude(mSceneGraph->GetBox().Size()) * 0.3f, 0, 0)); 700 702 mViewCellsManager->SetViewSpaceBox(viewSpaceBox); 701 703 } 702 703 704 else 705 { 706 viewSpaceBox = mSceneGraph->GetBox(); 707 mViewCellsManager->SetViewSpaceBox(viewSpaceBox); 708 } 709 704 710 bool loadVcGeometry; 705 711 Environment::GetSingleton()->GetBoolValue("ViewCells.loadGeometry", loadVcGeometry); … … 1037 1043 GetIntValue("Preprocessor.rayCastMethod", rayCastMethod); 1038 1044 1039 // first buildup the tree for havran ray caster if it is used 1045 #ifdef USE_HAVRAN_RAYCASTER 1046 1040 1047 if ((rayCastMethod == 2) || (rayCastMethod == 3)) 1041 { 1042 HavranRayCaster *hr = 0; 1043 1044 if (rayCastMethod == 3) 1045 hr = reinterpret_cast<HavranDynRayCaster*>(mRayCaster); 1046 else 1047 hr = reinterpret_cast<HavranRayCaster*>(mRayCaster); 1048 1049 hr->Build(this->mObjects); 1050 } 1051 1052 // #ifdef USE_HAVRAN_RAYCASTER 1053 // if ((rayCastMethod == 2) || (rayCastMethod == 3)) 1054 // { 1055 // HavranRayCaster *hr = 0; 1056 1057 // if (rayCastMethod == 3) 1058 // hr = reinterpret_cast<HavranDynRayCaster*>(mRayCaster); 1059 // else 1060 // hr = reinterpret_cast<HavranRayCaster*>(mRayCaster); 1061 1062 // string ktbFilename = internKdTree; 1063 // int l = (int)ktbFilename.length(); 1064 // ktbFilename[l-1] = 't'; 1065 // ktbFilename[l-2] = 'b'; 1066 // ktbFilename[l-3] = 'k'; 1067 1068 // cout << "Trying to load tree from file " << ktbFilename << endl; 1069 // if (hr->ImportBinTree(ktbFilename, this->mObjects)) { 1070 // cout << "Loading failed - building kd-tree" << endl; 1071 // hr->Build(this->mObjects); 1072 // cout << "Exporting kd-tree to file " << ktbFilename << endl; 1073 // hr->ExportBinTree(ktbFilename); 1074 // } 1075 // else 1076 // cout << " done." << endl; 1077 // } 1078 // #endif 1048 { 1049 HavranRayCaster *hr = 0; 1050 1051 if (rayCastMethod == 3) 1052 hr = reinterpret_cast<HavranDynRayCaster*>(mRayCaster); 1053 else 1054 hr = reinterpret_cast<HavranRayCaster*>(mRayCaster); 1055 1056 string ktbFilename = internKdTree; 1057 int l = (int)ktbFilename.length(); 1058 ktbFilename[l-1] = 't'; 1059 ktbFilename[l-2] = 'b'; 1060 ktbFilename[l-3] = 'k'; 1061 1062 cout << "Trying to load tree from file " << ktbFilename << endl; 1063 if (hr->ImportBinTree(ktbFilename, this->mObjects)) { 1064 cout << "Loading failed - building kd-tree" << endl; 1065 hr->Build(this->mObjects); 1066 cout << "Exporting kd-tree to file " << ktbFilename << endl; 1067 hr->ExportBinTree(ktbFilename); 1068 } 1069 else 1070 cout << " done." << endl; 1071 } 1072 #endif 1079 1073 1080 1074 … … 1679 1673 1680 1674 1681 void Preprocessor::ObjectMoved(SceneGraphLeaf *object) 1682 { 1683 // first invalidate all PVS from which this object is visible 1684 ViewCellContainer::const_iterator vit, vit_end = mViewCellsManager->GetViewCells().end(); 1685 1686 AxisAlignedBox3 box = object->GetBox(); 1687 1688 ObjectContainer objects; 1689 1690 if (0) 1691 { 1692 // simplified computation taking only the objects intersecting the box 1675 /** Object has moved - must dynamically update all affected PVSs */ 1676 void 1677 Preprocessor::ObjectMoved(SceneGraphLeaf *object) 1678 { 1679 // first invalidate all PVS from which this object is visible 1680 ViewCellContainer::const_iterator vit, vit_end = mViewCellsManager->GetViewCells().end(); 1681 1682 AxisAlignedBox3 box = object->GetBox(); 1683 1684 ObjectContainer objects; 1685 1686 if (0) 1687 { 1688 // simplified computation taking only the objects intersecting the box 1693 1689 KdNode::NewMail(); 1694 1690 -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r2698 r2700 520 520 521 521 BSP { 522 #termCrit auto522 termCrit auto 523 523 # termCrit auto2 524 termCrit adhoc524 # termCrit adhoc 525 525 # For Arena 526 526 #maxDepthAllowed 15 527 527 #maxListLength 8 528 528 # For Vienna 529 maxDepthAllowed 22530 maxListLength 6529 # maxDepthAllowed 22 530 # maxListLength 6 531 531 # For Powerplant 532 532 # maxDepthAllowed 27 -
GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
r2699 r2700 1 CONFIG += release2 #CONFIG += debug1 #CONFIG += release 2 CONFIG += debug 3 3 CONFIG += console warn_off thread mlrt qt 4 4 -
GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
r2699 r2700 4 4 5 5 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 6 COMMAND="../scripts/preprocessor .sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=1000000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=140"6 COMMAND="../scripts/preprocessor-debug.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=1000000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=140" 7 7 8 8 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d"
Note: See TracChangeset
for help on using the changeset viewer.