Changeset 2700


Ignore:
Timestamp:
05/23/08 14:49:21 (16 years ago)
Author:
bittner
Message:

commin on nemo

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r2699 r2700  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: pá 23. V 13:41:28 2008 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: pá 23. V 14:49:37 2008 
    44# Project:  preprocessor.pro 
    55# Template: app 
     
    77############################################################################# 
    88 
    9 first: release 
    10 install: release-install 
    11 uninstall: release-uninstall 
     9first: debug 
     10install: debug-install 
     11uninstall: debug-uninstall 
    1212MAKEFILE      = Makefile 
    1313QMAKE         = qmake 
     
    2727MKDIR         = mkdir 
    2828SUBTARGETS    =  \ 
    29                 release \ 
    30                 debug 
     29                debug \ 
     30                release 
    3131 
     32debug: $(MAKEFILE).Debug FORCE 
     33        $(MAKE) -f $(MAKEFILE).Debug 
     34debug-make_default: $(MAKEFILE).Debug FORCE 
     35        $(MAKE) -f $(MAKEFILE).Debug  
     36debug-make_first: $(MAKEFILE).Debug FORCE 
     37        $(MAKE) -f $(MAKEFILE).Debug first 
     38debug-all: $(MAKEFILE).Debug FORCE 
     39        $(MAKE) -f $(MAKEFILE).Debug all 
     40debug-clean: $(MAKEFILE).Debug FORCE 
     41        $(MAKE) -f $(MAKEFILE).Debug clean 
     42debug-distclean: $(MAKEFILE).Debug FORCE 
     43        $(MAKE) -f $(MAKEFILE).Debug distclean 
     44debug-install: $(MAKEFILE).Debug FORCE 
     45        $(MAKE) -f $(MAKEFILE).Debug install 
     46debug-uninstall: $(MAKEFILE).Debug FORCE 
     47        $(MAKE) -f $(MAKEFILE).Debug uninstall 
    3248release: $(MAKEFILE).Release FORCE 
    3349        $(MAKE) -f $(MAKEFILE).Release 
     
    4662release-uninstall: $(MAKEFILE).Release FORCE 
    4763        $(MAKE) -f $(MAKEFILE).Release uninstall 
    48 debug: $(MAKEFILE).Debug FORCE 
    49         $(MAKE) -f $(MAKEFILE).Debug 
    50 debug-make_default: $(MAKEFILE).Debug FORCE 
    51         $(MAKE) -f $(MAKEFILE).Debug  
    52 debug-make_first: $(MAKEFILE).Debug FORCE 
    53         $(MAKE) -f $(MAKEFILE).Debug first 
    54 debug-all: $(MAKEFILE).Debug FORCE 
    55         $(MAKE) -f $(MAKEFILE).Debug all 
    56 debug-clean: $(MAKEFILE).Debug FORCE 
    57         $(MAKE) -f $(MAKEFILE).Debug clean 
    58 debug-distclean: $(MAKEFILE).Debug FORCE 
    59         $(MAKE) -f $(MAKEFILE).Debug distclean 
    60 debug-install: $(MAKEFILE).Debug FORCE 
    61         $(MAKE) -f $(MAKEFILE).Debug install 
    62 debug-uninstall: $(MAKEFILE).Debug FORCE 
    63         $(MAKE) -f $(MAKEFILE).Debug uninstall 
    6464 
    65 Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
     65Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
    6666                C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 
    6767                C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ 
    6868                C:\Qt\4.1.2\mkspecs\features\default_pre.prf \ 
    6969                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 \ 
    7171                C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf \ 
    7272                C:\Qt\4.1.2\mkspecs\features\default_post.prf \ 
     
    8989C:\Qt\4.1.2\mkspecs\features\default_pre.prf: 
    9090C:\Qt\4.1.2\mkspecs\features\win32\default_pre.prf: 
    91 C:\Qt\4.1.2\mkspecs\features\release.prf: 
     91C:\Qt\4.1.2\mkspecs\features\debug.prf: 
    9292C:\Qt\4.1.2\mkspecs\features\debug_and_release.prf: 
    9393C:\Qt\4.1.2\mkspecs\features\default_post.prf: 
     
    109109qmake_all: FORCE 
    110110 
    111 make_default: release-make_default debug-make_default FORCE 
    112 make_first: release-make_first debug-make_first FORCE 
    113 all: release-all debug-all FORCE 
    114 clean: release-clean debug-clean FORCE 
     111make_default: debug-make_default release-make_default FORCE 
     112make_first: debug-make_first release-make_first FORCE 
     113all: debug-all release-all FORCE 
     114clean: debug-clean release-clean FORCE 
    115115        -$(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 
     120distclean: debug-distclean release-distclean FORCE 
    117121        -$(DEL_FILE) Makefile 
    118122 
     123debug-mocclean: $(MAKEFILE).Debug 
     124        $(MAKE) -f $(MAKEFILE).Debug mocclean 
    119125release-mocclean: $(MAKEFILE).Release 
    120126        $(MAKE) -f $(MAKEFILE).Release mocclean 
    121 debug-mocclean: $(MAKEFILE).Debug 
    122         $(MAKE) -f $(MAKEFILE).Debug mocclean 
    123 mocclean: release-mocclean debug-mocclean 
     127mocclean: debug-mocclean release-mocclean 
    124128 
     129debug-mocables: $(MAKEFILE).Debug 
     130        $(MAKE) -f $(MAKEFILE).Debug mocables 
    125131release-mocables: $(MAKEFILE).Release 
    126132        $(MAKE) -f $(MAKEFILE).Release mocables 
    127 debug-mocables: $(MAKEFILE).Debug 
    128         $(MAKE) -f $(MAKEFILE).Debug mocables 
    129 mocables: release-mocables debug-mocables 
     133mocables: debug-mocables release-mocables 
    130134FORCE: 
    131135 
     136$(MAKEFILE).Debug: Makefile 
    132137$(MAKEFILE).Release: Makefile 
    133 $(MAKEFILE).Debug: Makefile 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2699 r2700  
    254254                { 
    255255                        Triangle3 tri = static_cast<TriangleIntersectable *>(obj)->GetItem(); 
    256                         //tri.mVertices[0] *= 10; tri.mVertices[1] *= 10; tri.mVertices[2] *= 10; 
    257256 
    258257                        samplesOut.write(reinterpret_cast<char *>(tri.mVertices + 0), sizeof(Vector3)); 
     
    527526                cout << "finished loading" << endl; 
    528527        } 
    529          
     528 
    530529        return result; 
    531530} 
     
    663662                cout << "loading objects from " << buf << endl; 
    664663 
    665                 // load scene objects which are the entities used as pvs entries 
     664                // load scene objects used as pvs entries 
    666665                ObjectContainer pvsObjects; 
    667666                if (0) LoadObjects(buf, pvsObjects, mObjects); 
    668667 
    669                 const bool finalizeViewCells = false; 
     668                const bool finalizeViewCells = true; 
    670669                cout << "loading view cells from " << buf << endl; 
    671670                 
     
    690689                mViewCellsManager = CreateViewCellsManager(buf); 
    691690 
     691                // default view space is the extent of the scene 
     692                AxisAlignedBox3 viewSpaceBox; 
     693 
    692694                if (mUseViewSpaceBox) 
    693695                { 
    694                         // default view space is the extent of the scene 
    695                         AxisAlignedBox3 viewSpaceBox = mSceneGraph->GetBox(); 
     696                        viewSpaceBox = mSceneGraph->GetBox(); 
    696697 
    697698                        // use a small box outside of the scene 
    698699                        viewSpaceBox.Scale(Vector3(0.15f, 0.3f, 0.5f)); 
     700                        //viewSpaceBox.Translate(Vector3(Magnitude(mSceneGraph->GetBox().Size()) * 0.5f, 0, 0)); 
    699701                        viewSpaceBox.Translate(Vector3(Magnitude(mSceneGraph->GetBox().Size()) * 0.3f, 0, 0)); 
    700702                        mViewCellsManager->SetViewSpaceBox(viewSpaceBox); 
    701703                } 
    702                  
    703                  
     704                else 
     705                { 
     706                        viewSpaceBox = mSceneGraph->GetBox(); 
     707                        mViewCellsManager->SetViewSpaceBox(viewSpaceBox); 
     708                } 
     709 
    704710                bool loadVcGeometry; 
    705711                Environment::GetSingleton()->GetBoolValue("ViewCells.loadGeometry", loadVcGeometry); 
     
    10371043        GetIntValue("Preprocessor.rayCastMethod", rayCastMethod); 
    10381044 
    1039   // first buildup the tree for havran ray caster if it is used 
     1045#ifdef USE_HAVRAN_RAYCASTER 
     1046 
    10401047  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 
    10791073 
    10801074 
     
    16791673 
    16801674 
    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 */ 
     1676void 
     1677Preprocessor::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 
    16931689                KdNode::NewMail(); 
    16941690 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r2698 r2700  
    520520 
    521521BSP { 
    522   # termCrit      auto 
     522  termCrit       auto 
    523523  # termCrit      auto2 
    524   termCrit       adhoc 
     524  # termCrit      adhoc 
    525525  # For Arena 
    526526  #maxDepthAllowed 15 
    527527  #maxListLength    8 
    528528  # For Vienna 
    529   maxDepthAllowed 22 
    530   maxListLength    6 
     529  # maxDepthAllowed 22 
     530  # maxListLength    6 
    531531  # For Powerplant 
    532532  # maxDepthAllowed  27 
  • GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro

    r2699 r2700  
    1 CONFIG += release 
    2 #CONFIG += debug 
     1#CONFIG += release 
     2CONFIG += debug 
    33CONFIG += console warn_off thread mlrt qt 
    44 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test2

    r2699 r2700  
    44 
    55#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" 
     6COMMAND="../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" 
    77 
    88#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.