Changeset 2255 for GTP/trunk


Ignore:
Timestamp:
03/16/07 17:20:26 (17 years ago)
Author:
mattausch
Message:

improved scenemanager config

Location:
GTP/trunk/Lib/Vis
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/GtpVisibility.sln

    r2230 r2255  
    1717                {5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638} 
    1818                {5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638} 
     19                {101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900} 
    1920                {EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA} 
     21        EndProjectSection 
     22EndProject 
     23Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Preprocessor", "Preprocessing\src\Preprocessor.vcproj", "{EABCE292-D598-4600-A1C9-2591E7D62FDA}" 
     24        ProjectSection(ProjectDependencies) = postProject 
     25        EndProjectSection 
     26EndProject 
     27Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPreprocessor", "Preprocessing\src\TestPreprocessor.vcproj", "{69BC58F0-C7EB-4B43-B782-B6F047EF0528}" 
     28        ProjectSection(ProjectDependencies) = postProject 
     29                {EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA} 
     30        EndProjectSection 
     31EndProject 
     32Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCullingTerrain", "..\..\App\Demos\Vis\HillyTerrain\OGRE\TestCullingTerrain.vcproj", "{248F19A6-2FE0-4F5D-8928-E0EA10609887}" 
     33        ProjectSection(ProjectDependencies) = postProject 
     34                {5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638} 
    2035                {101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900} 
    21         EndProjectSection 
    22 EndProject 
    23 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Preprocessor", "Preprocessing\src\Preprocessor.vcproj", "{EABCE292-D598-4600-A1C9-2591E7D62FDA}" 
    24         ProjectSection(ProjectDependencies) = postProject 
    25         EndProjectSection 
    26 EndProject 
    27 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPreprocessor", "Preprocessing\src\TestPreprocessor.vcproj", "{69BC58F0-C7EB-4B43-B782-B6F047EF0528}" 
    28         ProjectSection(ProjectDependencies) = postProject 
    29                 {EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA} 
    30         EndProjectSection 
    31 EndProject 
    32 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCullingTerrain", "..\..\App\Demos\Vis\HillyTerrain\OGRE\TestCullingTerrain.vcproj", "{248F19A6-2FE0-4F5D-8928-E0EA10609887}" 
    33         ProjectSection(ProjectDependencies) = postProject 
    34                 {5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638} 
    3536                {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} 
    36                 {101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900} 
    3737        EndProjectSection 
    3838EndProject 
     
    442442                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Universal Unicode Release.ActiveCfg = Release|Win32 
    443443                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Universal Unicode Release.Build.0 = Release|Win32 
     444                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Debug.ActiveCfg = Debug|Win32 
     445                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Debug.Build.0 = Debug|Win32 
     446                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Debug Static.ActiveCfg = Debug|Win32 
     447                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Debug Static.Build.0 = Debug|Win32 
     448                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Debug.ActiveCfg = Debug|Win32 
     449                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Debug.Build.0 = Debug|Win32 
     450                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Release.ActiveCfg = Release|Win32 
     451                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Release.Build.0 = Release|Win32 
     452                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Unicode Debug.ActiveCfg = Debug|Win32 
     453                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Unicode Debug.Build.0 = Debug|Win32 
     454                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Unicode Release.ActiveCfg = Release|Win32 
     455                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Unicode Release.Build.0 = Release|Win32 
     456                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Debug.ActiveCfg = Debug|Win32 
     457                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Debug.Build.0 = Debug|Win32 
     458                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Release.ActiveCfg = Release|Win32 
     459                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Release.Build.0 = Release|Win32 
     460                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Unicode Debug.ActiveCfg = Debug|Win32 
     461                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Unicode Debug.Build.0 = Debug|Win32 
     462                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Unicode Release.ActiveCfg = Release|Win32 
     463                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.DLL Universal Unicode Release.Build.0 = Release|Win32 
     464                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.mlrt.ActiveCfg = mlrt|Win32 
     465                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.mlrt.Build.0 = mlrt|Win32 
     466                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release.ActiveCfg = Release|Win32 
     467                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release.Build.0 = Release|Win32 
     468                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release Internal.ActiveCfg = Release Internal|Win32 
     469                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release Internal.Build.0 = Release Internal|Win32 
     470                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release Static.ActiveCfg = Release|Win32 
     471                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release Static.Build.0 = Release|Win32 
     472                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release_Internal.ActiveCfg = Release_Internal|Win32 
     473                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release_Internal.Build.0 = Release_Internal|Win32 
     474                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.release_noqt.ActiveCfg = Release_qt|Win32 
     475                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.release_noqt.Build.0 = Release_qt|Win32 
     476                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release_qt.ActiveCfg = Release_qt|Win32 
     477                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Release_qt.Build.0 = Release_qt|Win32 
     478                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Unicode Debug.ActiveCfg = Debug|Win32 
     479                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Unicode Debug.Build.0 = Debug|Win32 
     480                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Unicode Release.ActiveCfg = Release|Win32 
     481                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Unicode Release.Build.0 = Release|Win32 
     482                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Debug.ActiveCfg = Debug|Win32 
     483                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Debug.Build.0 = Debug|Win32 
     484                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Release.ActiveCfg = Release|Win32 
     485                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Release.Build.0 = Release|Win32 
     486                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Unicode Debug.ActiveCfg = Debug|Win32 
     487                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Unicode Debug.Build.0 = Debug|Win32 
     488                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Unicode Release.ActiveCfg = Release|Win32 
     489                {5776B40B-5FCE-46D5-8F7C-3912E24E0638}.Universal Unicode Release.Build.0 = Release|Win32 
    444490        EndGlobalSection 
    445491        GlobalSection(ExtensibilityGlobals) = postSolution 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h

    r2254 r2255  
    191191        void _renderScene(Camera* camera, Viewport* vp, bool includeOverlays); 
    192192 
    193         int FindExactVisibleObjects(Camera *camera, 
    194                                                                 Viewport* vp, 
    195                                                                 const bool fromPoint, 
    196                                                                 const bool nodeVisibility);      
     193        int QueryVisibleObjectsExact(Camera *camera, 
     194                                                                 Viewport* vp, 
     195                                                                 const bool fromPoint, 
     196                                                                 const bool nodeVisibility);     
    197197 
    198198        void AddVisibleMeshGeometryToQueue(const GtpVisibility::MeshInfoContainer &visibleGeometry,  
     
    299299        int mCurrentFrame; 
    300300 
     301        int mQueryMode; 
     302         
     303        enum {EXACT_QUERIES, NODE_QUERIES, APPROXIMATE_QUERIES}; 
     304 
    301305        ObjReader *mObjReader; 
    302306 
     
    305309        bool mUseFromPointQueries; 
    306310 
    307         bool mUseExactQueries; 
    308          
    309         bool mUseDepthPassForQueries; 
     311        bool mResetMaterialForQueries; 
    310312}; 
    311313 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionQueriesQueryManager.h

    r2171 r2255  
    1515                on different hierarchy types, while reusing the implementation of the query methods. 
    1616    */ 
    17         OcclusionQueriesQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface, Viewport *vp, 
    18                                                                  int queryModes, int itemBufferMode); 
     17        OcclusionQueriesQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface,  
     18                                                                 Viewport *vp, 
     19                                                                 int queryModes,  
     20                                                                 int itemBufferMode); 
    1921     
    2022    void ComputeCameraVisibility(const Camera &camera, 
     
    2224                                                                 GtpVisibility::MeshInfoContainer *visibleGeometry, 
    2325                                                                 GtpVisibility::PatchInfoContainer *visiblePatches, 
    24                                                                  bool relativeVisibility = false); 
     26                                                                 const bool relativeVisibility, 
     27                                                                 const bool approximateVisibility); 
    2528     
    2629    /**  
     
    3235                                                                        GtpVisibility::MeshInfoContainer *visibleGeometry, 
    3336                                                                        GtpVisibility::PatchInfoContainer *visiblePatches, 
    34                                                                         bool relativeVisibility = false); 
     37                                                                        const bool relativeVisibility, 
     38                                                                        const bool approximateVisibility); 
    3539     
    3640 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformQueryManager.h

    r925 r2255  
    1818    */ 
    1919        PlatformQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface,  
    20                                  Viewport *vp, int queryModes); 
     20                                 Viewport *vp,  
     21                                                 int queryModes); 
    2122     
    2223    /**  
     
    2526    */ 
    2627    void ComputeFromPointVisibility(const Vector3 &point, 
    27                                GtpVisibility::NodeInfoContainer *visibleNodes, 
    28                                GtpVisibility::MeshInfoContainer *visibleGeometry, 
    29                                    GtpVisibility::PatchInfoContainer *visiblePatches, 
    30                                bool relativeVisibility = false); 
     28                                                                        GtpVisibility::NodeInfoContainer *visibleNodes, 
     29                                                                        GtpVisibility::MeshInfoContainer *visibleGeometry, 
     30                                                                        GtpVisibility::PatchInfoContainer *visiblePatches, 
     31                                                                        const bool relativeVisibility, 
     32                                                                        const bool approximateVisibility); 
    3133   
    3234        void ComputeCameraVisibility(const Camera &camera, 
    33                                GtpVisibility::NodeInfoContainer *visibleNodes, 
    34                                GtpVisibility::MeshInfoContainer *visibleGeometry, 
    35                                    GtpVisibility::PatchInfoContainer *visiblePatches, 
    36                                bool relativeVisibility = false); 
     35                                                                 GtpVisibility::NodeInfoContainer *visibleNodes, 
     36                                                                 GtpVisibility::MeshInfoContainer *visibleGeometry, 
     37                                                                 GtpVisibility::PatchInfoContainer *visiblePatches, 
     38                                                                 const bool relativeVisibility, 
     39                                                                 const bool approximateVisibility); 
    3740   
    3841        bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false);   
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp

    r2254 r2255  
    6767mFlushRate(10), 
    6868mCurrentFrame(0), 
    69 mUseVisibilityQueries(false), 
     69mUseVisibilityQueries(true), 
    7070mUseFromPointQueries(false), 
    71 mUseExactQueries(false), 
    72 mUseDepthPassForQueries(false) 
     71mQueryMode(NODE_QUERIES), 
     72mResetMaterialForQueries(false) 
    7373{ 
    7474        Ogre::LogManager::getSingleton(). 
     
    245245        } 
    246246 
    247         val = config.getSetting("UseExactQueries"); 
     247        val = config.getSetting("QueryObjectsMode"); 
    248248 
    249249        if (!val.empty()) 
    250250        { 
     251                if (val == "EXACT") 
     252                        mQueryMode = EXACT_QUERIES; 
     253                else if (val == "NODE") 
     254                        mQueryMode = NODE_QUERIES; 
     255                else  
     256                        mQueryMode = APPROXIMATE_QUERIES; 
     257        } 
     258 
     259        val = config.getSetting("ResetMaterialForQueries"); 
     260 
     261        if (!val.empty()) 
     262        { 
    251263                if (val == "yes") 
    252                         mUseExactQueries = true; 
     264                        mResetMaterialForQueries = true; 
    253265                else 
    254                         mUseExactQueries = false; 
    255         } 
    256  
    257         val = config.getSetting("UseDepthPassForQueries"); 
    258  
    259         if (!val.empty()) 
    260         { 
    261                 if (val == "yes") 
    262                         mUseDepthPassForQueries = true; 
    263                 else 
    264                         mUseDepthPassForQueries = false; 
     266                        mResetMaterialForQueries = false; 
    265267        } 
    266268 
     
    314316                        algorithm =  
    315317                                GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING; 
     318                        LogManager::getSingleton().logMessage("Using chc algorithm"); 
    316319                } 
    317320                else if (val == "SWC") 
     
    319322                         algorithm =  
    320323                                 GtpVisibility::VisibilityEnvironment::STOP_AND_WAIT_CULLING; 
     324 
     325                         LogManager::getSingleton().logMessage("Using stop and wait algorithm"); 
    321326                 } 
    322327                 else if (val == "VFC") 
     
    324329                         algorithm =  
    325330                                 GtpVisibility::VisibilityEnvironment::FRUSTUM_CULLING; 
     331 
     332                         LogManager::getSingleton().logMessage("Using frustum culling algorithm"); 
    326333                 } 
    327334                 else // default rendering 
     
    331338 
    332339                         mNormalExecution = true; 
     340                         LogManager::getSingleton().logMessage("Using default octree scene manager rendering"); 
    333341                 } 
    334342 
    335343                 mVisibilityManager->SetCullingManager(algorithm); 
    336  
    337                  stringstream d; 
    338                  d << "setting algorithm to: " << algorithm; 
    339                  LogManager::getSingleton().logMessage(d.str()); 
    340344        } 
    341345 
    342346        ///////////// 
    343347        // terrain options 
     348 
     349        if (mUseDepthPass) 
     350                LogManager::getSingleton().logMessage("using depth pass"); 
     351        else 
     352                LogManager::getSingleton().logMessage("not using depth pass"); 
     353         
     354        if (mExecuteVertexProgramForAllPasses) 
     355                LogManager::getSingleton().logMessage("executing vertex program for passes"); 
     356        else 
     357                LogManager::getSingleton().logMessage("not executing vertex program for passes"); 
     358 
     359        if (mUseVisibilityQueries) 
     360                LogManager::getSingleton().logMessage("using visibility queries"); 
     361        else 
     362                LogManager::getSingleton().logMessage("not using visibility queries"); 
     363 
     364        if (mUseFromPointQueries) 
     365                LogManager::getSingleton().logMessage("using from point queries"); 
     366        else 
     367                LogManager::getSingleton().logMessage("not using from point queries"); 
     368 
     369        if (mQueryMode == EXACT_QUERIES) 
     370                LogManager::getSingleton().logMessage("using exact queries"); 
     371        else if (mQueryMode == NODE_QUERIES) 
     372                LogManager::getSingleton().logMessage("using node queries"); 
     373        else if (mQueryMode == APPROXIMATE_QUERIES) 
     374                LogManager::getSingleton().logMessage("using approximate queries"); 
     375 
     376        if (mResetMaterialForQueries) 
     377                LogManager::getSingleton().logMessage("resetting material for queries"); 
     378        else 
     379                LogManager::getSingleton().logMessage("resetting material for queries"); 
     380 
     381        if (mDeleteQueueAfterRendering) 
     382                LogManager::getSingleton().logMessage("flushing queue after some frames"); 
     383        else 
     384                LogManager::getSingleton().logMessage("not flushing queue after some frames"); 
    344385 
    345386        if (!mShowTerrain) 
     
    449490        selectPageSource(pageSourceName, optlist); 
    450491 
    451         if (mUseDepthPass) 
    452                 LogManager::getSingleton().logMessage("using depth"); 
    453         else 
    454                 LogManager::getSingleton().logMessage("not using depth"); 
    455          
    456         if (mExecuteVertexProgramForAllPasses) 
    457                 LogManager::getSingleton().logMessage("executing vertex program for passes"); 
    458         else 
    459                 LogManager::getSingleton().logMessage("not executing vertex program for passes"); 
    460  
    461         if (mUseVisibilityQueries) 
    462                 LogManager::getSingleton().logMessage("using visibility queries"); 
    463         else 
    464                 LogManager::getSingleton().logMessage("not using visibility queries"); 
    465  
    466         if (mUseFromPointQueries) 
    467                 LogManager::getSingleton().logMessage("using from point queries"); 
    468         else 
    469                 LogManager::getSingleton().logMessage("not using from point queries"); 
    470  
    471         if (mUseExactQueries) 
    472                 LogManager::getSingleton().logMessage("using exact queries"); 
    473         else 
    474                 LogManager::getSingleton().logMessage("not using exact queries"); 
    475  
    476         if (mUseDepthPassForQueries) 
    477                 LogManager::getSingleton().logMessage("using depth pass for queries"); 
    478         else 
    479                 LogManager::getSingleton().logMessage("not using depth pass for queries"); 
    480  
    481         if (mDeleteQueueAfterRendering) 
    482                 LogManager::getSingleton().logMessage("flushing queue after rendering"); 
    483         else 
    484                 LogManager::getSingleton().logMessage("not flushing queue after rendering"); 
    485  
     492         
    486493        LogManager::getSingleton().logMessage("****** OcclusionCullingSceneManager Options Finished ********"); 
    487494} 
     
    11261133                return true; 
    11271134        } 
    1128         if (key == "UseExactQueries") 
    1129         { 
    1130                 mUseExactQueries = *static_cast<const bool *>(val); 
    1131  
    1132                 return true; 
    1133         } 
    1134         if (key == "UseDepthPassForQueries") 
    1135         { 
    1136                 mUseDepthPassForQueries = *static_cast<const bool *>(val); 
     1135        if (key == "QueryMode") 
     1136        { 
     1137                mQueryMode = *static_cast<const int *>(val); 
     1138 
     1139                return true; 
     1140        } 
     1141        if (key == "ResetMaterialForQueries") 
     1142        { 
     1143                mResetMaterialForQueries = *static_cast<const bool *>(val); 
    11371144        } 
    11381145        if (key == "UseFromPointQueries") 
     
    11921199                return true; 
    11931200        } 
     1201 
    11941202        if (key == "VisibleObjects") 
    11951203        {  
     
    12011209                 
    12021210                * static_cast<unsigned int *>(val) =  
    1203                         (unsigned int)FindExactVisibleObjects(mCameraInProgress,  
    1204                                                                                                   mCurrentViewport,  
    1205                                                                                                   fromPoint,  
    1206                                                                                                   nodeVisibility); 
     1211                        (unsigned int)QueryVisibleObjectsExact(mCameraInProgress,  
     1212                                                                                                   mCurrentViewport,  
     1213                                                                                                   fromPoint,  
     1214                                                                                                   nodeVisibility); 
    12071215                return true; 
    12081216        } 
     
    18651873        int i = 0; 
    18661874 
    1867         if (filename == "terrain") 
    1868         { 
    1869                 LogManager::getSingleton().logMessage("loading terrain"); 
     1875        if (filename == "terrain" || filename == "") 
     1876        { 
     1877                LogManager::getSingleton().logMessage("not loading scene"); 
    18701878 
    18711879                // terrain hack 
     
    22032211} 
    22042212//----------------------------------------------------------------------- 
    2205 int OcclusionCullingSceneManager::FindExactVisibleObjects(Camera *camera, 
    2206                                                                                                                   Viewport* vp, 
    2207                                                                                                                   const bool fromPoint, 
    2208                                                                                                                   const bool nodeVisibility) 
     2213int OcclusionCullingSceneManager::QueryVisibleObjectsExact(Camera *camera, 
     2214                                                                                                                   Viewport* vp, 
     2215                                                                                                                   const bool fromPoint, 
     2216                                                                                                                   const bool nodeVisibility) 
    22092217{ 
    22102218        const int itemBufferMode = 0; 
    22112219        const bool relativeVisibility = false; 
     2220        const bool approximateVisibility = false; 
    22122221 
    22132222        int queryModes = 0; 
     
    22362245                                                                                                 &visibleGeometry,  
    22372246                                                                                                 &visiblePatches,  
    2238                                                                                                  relativeVisibility); 
     2247                                                                                                 relativeVisibility, 
     2248                                                                                                 approximateVisibility); 
    22392249        } 
    22402250        else 
     
    22442254                                                                                          &visibleGeometry,  
    22452255                                                                                          &visiblePatches,  
    2246                                                                                           relativeVisibility); 
     2256                                                                                          relativeVisibility, 
     2257                                                                                          approximateVisibility); 
    22472258        } 
    22482259                 
     
    24892500        // note:have to disable deph write for nodes! 
    24902501    bool savedUseDepthPass = mUseDepthPass; 
    2491         if (mUseDepthPassForQueries) mUseDepthPass = true; 
     2502        if (mResetMaterialForQueries) mUseDepthPass = true; 
    24922503 
    24932504        // lists only used for visualization 
     
    24982509        const int itemBufferMode = 0; 
    24992510        const bool relativeVisibility = false; 
     2511        bool approximateVisibility = false; 
    25002512 
    25012513        int queryModes = 0; 
    25022514 
    2503         if (mUseExactQueries) 
     2515        if (mQueryMode != 0) 
     2516        { 
     2517                queryModes |= GtpVisibility::QueryManager::NODE_VISIBILITY; 
     2518 
     2519                if (mQueryMode == 2) 
     2520                { 
     2521                        approximateVisibility = true; 
     2522                } 
     2523        } 
     2524        else 
     2525        { 
    25042526                queryModes |= GtpVisibility::QueryManager::GEOMETRY_VISIBILITY; 
    2505         else 
    2506                 queryModes |= GtpVisibility::QueryManager::NODE_VISIBILITY; 
     2527        }        
    25072528                         
    25082529 
     
    25262547                                                                                                 &visibleGeometry,  
    25272548                                                                                                 &visiblePatches,  
    2528                                                                                                  relativeVisibility); 
     2549                                                                                                 relativeVisibility, 
     2550                                                                                                 approximateVisibility); 
    25292551        } 
    25302552        else 
     
    25342556                                                                                          &visibleGeometry,  
    25352557                                                                                          &visiblePatches,  
    2536                                                                                           relativeVisibility); 
     2558                                                                                          relativeVisibility, 
     2559                                                                                          approximateVisibility); 
    25372560        } 
    25382561                 
     
    25502573        //-- put items in render queue 
    25512574         
    2552         if (mUseExactQueries) 
     2575        if (mQueryMode != EXACT_QUERIES) 
    25532576        { 
    25542577                //////////// 
    25552578                //-- apply queries on geometry level 
    25562579 
     2580                AddVisibleNodeGeometryToQueue(visibleNodes, cam); 
     2581        } 
     2582        else 
     2583        { 
    25572584                AddVisibleMeshGeometryToQueue(visibleGeometry, cam); 
    2558         } 
    2559         else 
    2560         { 
    2561                 AddVisibleNodeGeometryToQueue(visibleNodes, cam); 
    25622585        } 
    25632586 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionQueriesQueryManager.cpp

    r2254 r2255  
    2828                                                                                        GtpVisibility::MeshInfoContainer *visibleGeometry, 
    2929                                                                                        GtpVisibility::PatchInfoContainer *visiblePatches, 
    30                                                                                         bool relativeVisibility) 
     30                                                                                        const bool relativeVisibility, 
     31                                                                                        const bool approximateVisibility) 
    3132{ 
    3233        // we need access to the scene manager and the rendersystem 
     
    3738        bool overlayEnabled = mViewport->getOverlaysEnabled(); 
    3839 
    39         /////////// 
    40         //-- render scene with item buffer (i.e., objects with their id as color codes) 
    41  
    4240        //mItemBufferMode = 0; 
    43         if (0 &&  
    44                 (mItemBufferMode && mQueryModes) != 0) 
    45         { 
     41        if (0 && (mItemBufferMode && mQueryModes) != 0) 
     42        { 
     43                /////////// 
     44                //-- render scene with item buffer (ids are used as color codes) 
     45 
    4646                int savedQueryModes = mQueryModes; 
    4747                mQueryModes = mItemBufferMode; 
     
    5151                                                                                                          visibleGeometry,  
    5252                                                                                                          visiblePatches,  
    53                                                                                                           relativeVisibility); 
     53                                                                                                          relativeVisibility, 
     54                                                                                                          approximateVisibility); 
    5455                 
    5556                // overlays cause false visibility 
     
    175176                        pfHierarchyInterface->CheckFrustumVisible(*nodeIt, intersects); 
    176177 
    177                         // always push back if intersects 
    178                         if (1 && intersects) 
     178                        // always push back if only checking approximate visibility or intersects 
     179                        if (approximateVisibility || intersects) 
    179180                        { 
    180181                                // no more information available 
     
    185186                                queryList[i].push_back(NULL); 
    186187                        } 
    187                         else 
     188                        else // issue occlusion query 
    188189                        { 
    189190                                queryList[i].push_back(mHierarchyInterface->IssueNodeOcclusionQuery(*nodeIt, false)); 
     
    200201                        for (geometryIt = geometryList.begin(); geometryIt != geometryIt_end; ++ geometryIt) 
    201202                        { 
    202                                 queryList[i].push_back(pfHierarchyInterface->IssueMeshOcclusionQuery(*geometryIt)); 
     203                                if (approximateVisibility) 
     204                                { 
     205                                        // no more information available 
     206                                        const int visPixels = 1; 
     207                                        const int projPixels = 1; 
     208 
     209                                        visibleGeometry->push_back(GtpVisibility::MeshInfo(*geometryIt, visPixels, projPixels)); 
     210                                } 
     211                                else 
     212                                { 
     213                                        queryList[i].push_back(pfHierarchyInterface->IssueMeshOcclusionQuery(*geometryIt)); 
     214                                } 
    203215                        } 
    204216                } 
     
    211223                        for (patchIt = patchList.begin(); patchIt != patchIt_end; ++patchIt) 
    212224                        { 
    213                                 queryList[i].push_back(pfHierarchyInterface->IssuePatchOcclusionQuery(*patchIt)); 
     225                                if (approximateVisibility) 
     226                                { 
     227                                        // no more information available 
     228                                        const int visPixels = 1; 
     229                                        const int projPixels = 1; 
     230 
     231                                        visiblePatches->push_back(GtpVisibility::PatchInfo(*patchIt, visPixels, projPixels)); 
     232                                } 
     233                                else 
     234                                { 
     235                                        queryList[i].push_back(pfHierarchyInterface->IssuePatchOcclusionQuery(*patchIt)); 
     236                                } 
    214237                        } 
    215238                } 
     
    284307                                                                GtpVisibility::MeshInfoContainer *visibleGeometry, 
    285308                                                                GtpVisibility::PatchInfoContainer *visiblePatches, 
    286                                                                 bool relativeVisibility) 
     309                                                                const bool relativeVisibility, 
     310                                                                const bool approximateVisibility) 
    287311{ 
    288312        PlatformQueryManager::ComputeFromPointVisibility(point,  
     
    290314                                                                                                         visibleGeometry,  
    291315                                                                                                         visiblePatches,  
    292                                                                                                          relativeVisibility); 
     316                                                                                                         relativeVisibility, 
     317                                                                                                         approximateVisibility); 
    293318 
    294319        // adds up their visibility and removes duplicates  
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp

    r2184 r2255  
    3333                                        GtpVisibility::MeshInfoContainer *visibleGeometry, 
    3434                                        GtpVisibility::PatchInfoContainer *visiblePatches, 
    35                                         bool relativeVisibility) 
     35                                        const bool relativeVisibility, 
     36                                        const bool approximateVisibility) 
    3637{ 
    3738        SceneManager *sm = 
     
    8788                                                                visibleGeometry,  
    8889                                                                visiblePatches,  
    89                                             relativeVisibility); 
     90                                            relativeVisibility, 
     91                                                                approximateVisibility); 
    9092                //mViewport->getTarget()->update(); for(int j=0; j<10000000; j++)       printf("wait"); 
    9193 
     
    102104//----------------------------------------------------------------------- 
    103105void PlatformQueryManager::ComputeCameraVisibility( 
    104                                                                 const Camera &camera, 
    105                                                                 GtpVisibility::NodeInfoContainer *visibleNodes, 
    106                                                                 GtpVisibility::MeshInfoContainer *visibleGeometry, 
    107                                                                 GtpVisibility::PatchInfoContainer *visiblePatches, 
    108                                                                 bool relativeVisibility) 
     106                                                                        const Camera &camera, 
     107                                                                        GtpVisibility::NodeInfoContainer *visibleNodes, 
     108                                                                        GtpVisibility::MeshInfoContainer *visibleGeometry, 
     109                                                                        GtpVisibility::PatchInfoContainer *visiblePatches, 
     110                                                                        const bool relativeVisibility, 
     111                                                                        const bool approximateVisibility) 
    109112{ 
    110113        // we need access to the scene manager and the rendersystem 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj

    r2254 r2255  
    5353                                Name="VCPostBuildEventTool" 
    5454                                CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName) 
    55 copy $(OutDir)\$(TargetFileName) E:\svn\gametools\GTP\trunk\App\Demos\Illum\Ogre\bin\$(ConfigurationName) 
    5655"/> 
    5756                        <Tool 
     
    125124                                Name="VCPostBuildEventTool" 
    126125                                CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName) 
    127 copy $(OutDir)\$(TargetFileName) E:\svn\gametools\GTP\trunk\App\Demos\Illum\Ogre\bin\$(ConfigurationName) 
    128126"/> 
    129127                        <Tool 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyQueryManager.h

    r2171 r2255  
    1010        hierarchy as visible node. 
    1111*/ 
    12 class DummyQueryManager : public QueryManager 
     12class DummyQueryManager: public QueryManager 
    1313{ 
    1414public: 
    1515    /** Constructor taking a scene traverser for a specific type of hierarchyInterface 
    16         as argument.  
     16                as argument.  
    1717    */ 
    1818    DummyQueryManager( HierarchyInterface *hierarchyInterface ): 
     
    2222       @sa QueryManager::ComputeCameraVisibility() 
    2323     */ 
    24     virtual void  ComputeCameraVisibility(const Camera &camera, 
    25                                                                                   NodeInfoContainer *visibleNodes, 
    26                                                                                   MeshInfoContainer *visibleGeometry, 
    27                                                                                   PatchInfoContainer *visiblePatches, 
    28                                                                                   bool relativeVisibility = false); 
     24    virtual void ComputeCameraVisibility(const Camera &camera, 
     25                                                                                 NodeInfoContainer *visibleNodes, 
     26                                                                                 MeshInfoContainer *visibleGeometry, 
     27                                                                                 PatchInfoContainer *visiblePatches, 
     28                                                                                 const bool relativeVisibility, 
     29                                                                                 const bool approximateVisibility); 
    2930     
    3031    /** 
    3132       @sa QueryManager::ComputeFromPointVisibility() 
    32      */ 
     33    */ 
    3334    virtual void ComputeFromPointVisibility(const Vector3 &point, 
    3435                                                                                    NodeInfoContainer *visibleNodes, 
    3536                                                                                        MeshInfoContainer *visibleGeometry, 
    3637                                                                                        PatchInfoContainer *visiblePatches, 
    37                                                                                         bool relativeVisibility = false); 
     38                                                                                        const bool relativeVisibility, 
     39                                                                                        const bool approximateVisibility); 
    3840}; 
    3941   
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/include/QueryManager.h

    r1251 r2255  
    5555                            MeshInfoContainer *visibleGeometry, 
    5656                                PatchInfoContainer *visiblePatches, 
    57                             bool relativeVisibility = false 
     57                            const bool relativeVisibility, 
     58                                const bool approximateVisibility 
    5859                            ) = 0; 
    5960     
     
    6768                               MeshInfoContainer *visibleGeometry, 
    6869                                   PatchInfoContainer *visiblePatches, 
    69                                bool relativeVisibility = false 
     70                               const bool relativeVisibility, 
     71                                   const bool approximateVisibility 
    7072                               ) = 0; 
    7173     
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/terrainCulling.cfg

    r2254 r2255  
    1212# 
    1313 
    14 DepthPass=0 
     14DepthPass=yes 
    1515 
    1616# 
    17 # render queue is flushed after some frames 
     17# If vertex programs should be executed even in the depth pass.  
     18# This options but is necessary if vertex shader alters geometry. But it can slow down the depth pass. 
     19 
     20ExecuteVertexProgramForDepth=no 
     21 
     22# 
     23# render queue is flushed after some frames (can improve performance) 
    1824# 
    1925 
    20 FlushQueue=1 
     26FlushQueue=yes 
     27 
     28########################################################## 
     29 
     30# 
     31# Settings for visible objects queries (used by _findVisibleObjects method of the scene manager) 
     32# 
     33 
     34# if visibility based queries should be applied instead of standard Octree SceneManager findvisibleobjects based 
     35# on frustum culling only 
     36 
     37UseVisibilityQueries=yes 
     38 
     39 
     40# For visibility based queries: the modes go from exact (exact visibility but slow)  
     41# to node (exact visibility on node level, faster) to approximate (fastest but only approximate visibility) 
     42 
     43#QueryObjectsMode=EXACT 
     44QueryObjectsMode=NODE 
     45#QueryObjectsMode=APPROXIMATE; 
     46         
     47 
     48# If queries should use no material for rendering.  
     49# Don't use this option if vertex program / fragment program changes geometry 
     50 
     51ResetMaterialForQueries=no 
    2152 
    2253 
     
    2556 
    2657# 
    27 #  Settings for iv scene (vienna) 
     58#  Scene geometry loading 
    2859# 
    2960 
     
    4071 
    4172# 
    42 # Visibility solution 
     73# use this option to render only terrain 
     74# 
     75 
     76Scene=terrain 
     77 
     78 
     79###################################################### 
     80 
     81# 
     82# Visibility solution (works not yet with terrain) 
    4383# 
    4484 
     
    4686 
    4787 
    48 ###################################################################### 
    4988 
     89################################################################## 
    5090# 
    51 #  Settings for terrain scene 
    52 # 
    53  
    54 Scene=terrain 
    55  
    56 # 
    57 # should render queue be flushed after each frame? 
     91# Terrain scene manager settings 
    5892# 
    5993 
    6094 
    61 ########################################### 
    62 # 
    63 # Terrain scene manager settings 
    64 # 
    65 ######################################### 
    6695 
    6796# The main world texture (if you wish the terrain manager to create a material for you) 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/gi_final.env

    r2232 r2255  
    1616 
    1717Preprocessor { 
    18         samplesPerPass 3000000 
     18        samplesPerPass 500000 
    1919        type vss 
    2020        detectEmptyViewSpace true 
     
    163163        Visualization { 
    164164                # how much samples we use for visualization 
    165                 samples 200 
     165                samples 0 
    166166                exportRays true 
    167167                exportGeometry true 
     
    173173        } 
    174174 
    175         showVisualization true 
    176         #showVisualization false 
     175        #showVisualization true 
     176        showVisualization false 
     177        #evaluateViewCells false 
    177178        evaluateViewCells true 
    178179         
    179180        Evaluation { 
    180                 #samples         200000000 
    181                 #samplesForStats 100000000 
    182                 samples          60000000 
    183                 samplesForStats  30000000 
    184  
    185                 samplesPerPass  250000 
    186  
    187                 #stepSize       500 
    188                 stepSize        100 
     181                samples         100000000 
     182                samplesForStats 100000000 
     183                #samples          10000000 
     184                #samplesForStats  10000000 
     185 
     186                samplesPerPass  500000 
     187                stepSize        200 
    189188 
    190189                samplingType box 
     
    221220 
    222221        # maximum number of tests per node 
    223         maxTests 1000000 
     222        maxTests 500000 
    224223} 
    225224 
     
    251250        splitUseOnlyDrivingAxis false 
    252251 
    253         maxTests 50000000 
     252        maxTests 500000 
    254253} 
    255254 
     
    266265        Construction { 
    267266 
    268                 samples 5000000 
     267                samples 6000000 
    269268 
    270269                # type 0 = sequential computation, 1 = interleaved, 2 = gradient 
     
    282281                minStepsOfSameType 100 
    283282                #maxStepsOfSameType 3000 
    284                 maxStepsOfSameType 1000 
    285  
    286                 maxRepairs 1000 
     283                maxStepsOfSameType 900 
     284 
     285                maxRepairs 2000 
    287286        } 
    288287 
     
    293292                # maximal memory in MB 
    294293#               maxMemory 4 
    295                 maxMemory 30 
     294                maxMemory 35 
    296295                # minimum ratio of global cost decrease 
    297296                minGlobalCostRatio -1 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/gi_final.sh

    r2232 r2255  
    1313SCENE_PATH=../data/vienna 
    1414 
    15 #SCENE=arena-high-lods.obj 
     15#SCENE=arena-high-lods 
    1616#SCENE_PATH=../data/Arena 
    1717 
    1818ENVIRONMENT=gi_final.env 
    1919 
    20 LOG_PREFIX=../scripts/tests/gi/$SCENE 
    21 #LOG_PREFIX=../scripts/tests/gi/vienna_cropped3 
     20LOG_PREFIX=../scripts/tests/gi/$SCENE-speed 
    2221 
    2322echo "starting $TARGET mode for $SCENE scene ($PROGRAM)" 
     
    3231 
    3332 
    34 $PROGRAM $ENVIRONMENT \ 
     33#$PROGRAM $ENVIRONMENT \ 
    3534  -scene_filename=$SCENE_FILENAME \ 
    3635  -view_cells_sampling_type=object_directional \ 
     
    4241  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
    4342  -hierarchy_construction_type=2 \ 
    44   -hierarchy_construction_min_avg_rays_per_object=1 \ 
    45   -hierarchy_construction_max_avg_rays_per_object=20 \ 
     43  -hierarchy_construction_min_avg_rays_per_object=0 \ 
     44  -hierarchy_construction_max_avg_rays_per_object=0 \ 
    4645  -bvh_use_sah=false \ 
    4746  -vsp_use_cost_heuristics=$USE_HEUR 
    4847 
    49 sh movefiles.sh $LOG_PREFIX-$METHOD 
    50  
    51  
     48#sh movefiles.sh $LOG_PREFIX-$METHOD 
    5249 
    5350####################################################### 
    5451 
    55 NODES=50000 
     52NODES=60000 
     53#NODES=5000 
    5654USE_HEUR=true 
    5755#USE_HEUR=false 
     
    6159 
    6260$PROGRAM $ENVIRONMENT \ 
    63 -scene_filename=$SCENE_FILENAME \ 
     61  -scene_filename=$SCENE_FILENAME \ 
    6462  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
    6563  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
     
    6967  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
    7068  -hierarchy_construction_type=0 \ 
     69  -hierarchy_construction_consider_memory=false \ 
    7170  -vsp_use_cost_heuristics=$USE_HEUR \ 
    7271  -bvh_term_max_leaves=$NODES 
     
    8584 
    8685$PROGRAM $ENVIRONMENT \ 
    87 -scene_filename=$SCENE_FILENAME \ 
     86  -scene_filename=$SCENE_FILENAME \ 
    8887  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
    8988  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
     
    9392  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
    9493  -hierarchy_construction_type=0 \ 
     94  -hierarchy_construction_consider_memory=false \ 
    9595  -vsp_use_cost_heuristics=$USE_HEUR \ 
    9696  -bvh_term_max_leaves=$NODES 
    9797 
    9898sh movefiles.sh $LOG_PREFIX-$METHOD 
    99  
    100  
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp

    r2239 r2255  
    5353/*              class BvhNode implementation                   */ 
    5454/***************************************************************/ 
     55 
    5556 
    5657BvhNode::BvhNode():  
     
    705706 
    706707        const float oldVolume = EvalViewCellsVolume(*tData.mSampledObjects) / viewSpaceVol; 
    707         const float oldRatio = (tData.mVolume) > 0 ? oldVolume / tData.mVolume : 1; 
     708        const float oldRatio = (tData.mVolume > 0) ? oldVolume / tData.mVolume : 1; 
    708709        const float parentVol = tData.mCorrectedVolume * oldRatio; 
    709710 
     
    18261827                                } 
    18271828                        } 
    1828                 } 
    18291829#endif 
     1830                } 
     1831 
    18301832        } 
    18311833 
     
    31713173float BvHierarchy::GetRenderCostIncrementially(BvhNode *node) const 
    31723174{ 
    3173         if (node->mRenderCost < 0) 
    3174         { 
    3175                 //cout <<"p"; 
     3175        if (node->mRenderCost < 0) // render cost must be evaluated ... 
     3176        { 
    31763177                if (node->IsLeaf()) 
    31773178                { 
    31783179                        BvhLeaf *leaf = static_cast<BvhLeaf *>(node); 
    3179                         node->mRenderCost = EvalAbsCost(leaf->mObjects); 
     3180                        node->mRenderCost = EvalAbsCost(leaf->mObjects);                 
     3181                        //if (leaf->mObjects.size() < 100) cout <<"p"; 
    31803182                } 
    31813183                else 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h

    r2233 r2255  
    11071107#if USE_BETTER_RENDERCOST_EST 
    11081108         
     1109        const float switchcost = 1.0f; 
     1110 
     1111        float o = 0; 
     1112 
    11091113        ObjectContainer::const_iterator oit, oit_end = objects.end(); 
    11101114 
    11111115        for (oit = objects.begin(); oit != oit_end; ++ oit) 
    11121116        { 
    1113                 result += ViewCellsManager::GetRendercost(*oit); 
    1114         } 
    1115  
     1117                o += ViewCellsManager::GetRendercost(*oit); 
     1118        } 
     1119 
     1120        float n = (float)objects.size() * switchcost; 
     1121         
    11161122#else 
    11171123         
     
    11211127 
    11221128#if BOUND_RENDERCOST 
    1123         result = max(result, MIN_RENDERCOST); 
     1129         
     1130        if (result > MIN_RENDERCOST) 
     1131                return result; 
     1132        else 
     1133        { 
     1134                //std::cout << "b"; 
     1135                return MIN_RENDERCOST; 
     1136        } 
    11241137#endif 
    11251138 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.icproj

    r2239 r2255  
    22<VisualStudioProject  
    33        ProjectType="Intel C++ Project" 
    4         Version="9.0" 
     4        Version="9.1" 
    55        Name="Preprocessor" 
    66        ProjectGUID="{E240C450-69B9-4B01-A6FD-88F9466A3A88}" 
     
    221221                                IntermediateDirectory="..\obj\Release" 
    222222                                ConfigurationType="4" 
    223                                 CharacterSet="2"/> 
     223                                CharacterSet="2" 
     224                                WholeProgramOptimization="0"/> 
    224225                        <Tool  
    225226                                Name="DebugTool"/> 
     
    237238                                AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(CG_INC_PATH)&quot;;Timer;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src;..\src\ootl\;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\cpp\include\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\src\cpp\include\ootl\mswin" 
    238239                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV" 
     240                                MinimalRebuild="1" 
    239241                                ExceptionHandling="1" 
    240242                                RuntimeLibrary="2" 
    241                                 EnableEnhancedInstructionSet="2" 
     243                                EnableEnhancedInstructionSet="0" 
    242244                                DisableLanguageExtensions="0" 
    243245                                ForceConformanceInForLoopScope="0" 
     
    247249                                WarningLevel="2" 
    248250                                Detect64BitPortabilityProblems="1" 
    249                                 DebugInformationFormat="3"/> 
     251                                DebugInformationFormat="3" 
     252                                UseProcExt="2" 
     253                                RequireProcExt="2"/> 
    250254                        <Tool  
    251255                                Name="LinkerTool" 
     
    288292                                InlineFunctionExpansion="2" 
    289293                                EnableIntrinsicFunctions="1" 
    290                                 ImproveFloatingPointConsistency="1" 
     294                                ImproveFloatingPointConsistency="0" 
    291295                                FavorSizeOrSpeed="1" 
    292296                                OmitFramePointers="1" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r2239 r2255  
    209209                        IntermediateDirectory="..\obj\Release" 
    210210                        ConfigurationType="4" 
    211                         CharacterSet="2"> 
     211                        CharacterSet="2" 
     212                        WholeProgramOptimization="TRUE"> 
    212213                        <Tool 
    213214                                Name="VCCLCompilerTool" 
     
    219220                                OmitFramePointers="TRUE" 
    220221                                EnableFiberSafeOptimizations="TRUE" 
     222                                WholeProgramOptimization="FALSE" 
    221223                                OptimizeForProcessor="3" 
    222224                                OptimizeForWindowsApplication="TRUE" 
    223225                                AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(CG_INC_PATH)&quot;;Timer;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src;..\src\ootl\;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\cpp\include\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\src\cpp\include\ootl\mswin" 
    224226                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV" 
     227                                StringPooling="TRUE" 
     228                                MinimalRebuild="TRUE" 
    225229                                ExceptionHandling="TRUE" 
    226230                                RuntimeLibrary="2" 
    227                                 EnableEnhancedInstructionSet="2" 
     231                                EnableEnhancedInstructionSet="0" 
    228232                                DisableLanguageExtensions="FALSE" 
    229233                                ForceConformanceInForLoopScope="FALSE" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.icproj

    r2232 r2255  
    22<VisualStudioProject  
    33        ProjectType="Intel C++ Project" 
    4         Version="9.0" 
     4        Version="9.1" 
    55        Name="TestPreprocessor" 
    66        ProjectGUID="{2BF1B1A6-D665-472B-B1B1-E172512D66C1}" 
     
    186186                        <Tool  
    187187                                Name="GeneralTool" 
    188                                 OutputDirectory="bin\Release" 
    189                                 IntermediateDirectory="bin\Release" 
    190                                 ConfigurationType="1" 
    191                                 CharacterSet="2"/> 
     188                                OutputDirectory="..\bin\Release" 
     189                                IntermediateDirectory="..\obj\Release" 
     190                                ConfigurationType="1" 
     191                                CharacterSet="2" 
     192                                WholeProgramOptimization="0"/> 
    192193                        <Tool  
    193194                                Name="DebugTool"/> 
     
    206207                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV" 
    207208                                StringPooling="1" 
     209                                MinimalRebuild="1" 
    208210                                ExceptionHandling="1" 
    209211                                RuntimeLibrary="2" 
    210                                 EnableEnhancedInstructionSet="2" 
     212                                EnableEnhancedInstructionSet="0" 
    211213                                RuntimeTypeInfo="0" 
    212214                                UsePrecompiledHeader="0" 
    213215                                WarningLevel="3" 
    214216                                Detect64BitPortabilityProblems="1" 
    215                                 DebugInformationFormat="3"/> 
     217                                DebugInformationFormat="3" 
     218                                UseProcExt="2" 
     219                                RequireProcExt="2"/> 
    216220                        <Tool  
    217221                                Name="LinkerTool" 
    218222                                DelayImpLib="" 
    219223                                AdditionalDependencies="xerces-c_2.lib glew32.lib zdll.lib zziplib.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib Preprocessor.lib RTScene.lib RTWorld.lib QtCore4.lib qtmain.lib cg.lib cgGL.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtInterface.lib" 
    220                                 OutputFile="../bin/release/Preprocessor.exe" 
     224                                OutputFile="../bin/release/Preprocessor2.exe" 
    221225                                LinkIncremental="1" 
    222226                                AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;&quot;$(QTDIR)\lib&quot;;.\QtInterface\Release;&quot;$(CG_LIB_PATH)&quot;" 
     
    252256                        <Tool  
    253257                                Name="GeneralTool" 
    254                                 OutputDirectory="Release" 
    255                                 IntermediateDirectory="Release" 
     258                                OutputDirectory="..\bin\Release" 
     259                                IntermediateDirectory="..\obj\Release" 
    256260                                ConfigurationType="1" 
    257261                                CharacterSet="2" 
    258                                 WholeProgramOptimization="0"/> 
     262                                WholeProgramOptimization="1"/> 
    259263                        <Tool  
    260264                                Name="DebugTool"/> 
     
    318322                        <Tool  
    319323                                Name="GeneralTool" 
    320                                 OutputDirectory="$(ConfigurationName)" 
    321                                 IntermediateDirectory="$(ConfigurationName)" 
     324                                OutputDirectory="..\bin\Release" 
     325                                IntermediateDirectory="..\obj\Release" 
    322326                                ConfigurationType="1" 
    323327                                CharacterSet="2"/> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r2238 r2255  
    197197                                OmitFramePointers="TRUE" 
    198198                                EnableFiberSafeOptimizations="TRUE" 
     199                                WholeProgramOptimization="FALSE" 
    199200                                OptimizeForProcessor="3" 
    200201                                OptimizeForWindowsApplication="TRUE" 
     
    202203                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV" 
    203204                                StringPooling="TRUE" 
     205                                MinimalRebuild="TRUE" 
    204206                                ExceptionHandling="TRUE" 
    205207                                RuntimeLibrary="2" 
    206                                 EnableEnhancedInstructionSet="2" 
     208                                EnableEnhancedInstructionSet="0" 
    207209                                RuntimeTypeInfo="FALSE" 
    208210                                UsePrecompiledHeader="0" 
     
    215217                                Name="VCLinkerTool" 
    216218                                AdditionalDependencies="xerces-c_2.lib glew32.lib zdll.lib zziplib.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib Preprocessor.lib RTScene.lib RTWorld.lib QtCore4.lib qtmain.lib cg.lib cgGL.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtInterface.lib" 
    217                                 OutputFile="../bin/release/Preprocessor2.exe" 
     219                                OutputFile="../bin/release/Preprocessor.exe" 
    218220                                LinkIncremental="1" 
    219221                                AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;&quot;$(QTDIR)\lib&quot;;.\QtInterface\Release;&quot;$(CG_LIB_PATH)&quot;" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2239 r2255  
    167167 
    168168        // mix of sampling strategies 
    169         if (0) 
    170         { 
    171                 //mStrategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
    172                 mStrategies.push_back(SamplingStrategy::OBJECT_DIRECTION_BASED_DISTRIBUTION); 
     169        if (1) 
     170        { 
     171                mStrategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
     172                //mStrategies.push_back(SamplingStrategy::OBJECT_DIRECTION_BASED_DISTRIBUTION); 
    173173        } 
    174174        else 
     
    28152815         
    28162816        // check if last ray was not same ray with reverse direction 
    2817         if (!lastVssRay || 
    2818                 !(ray.mOrigin == lastVssRay->mTermination) || 
    2819                 !(ray.mTermination == lastVssRay->mOrigin))  
     2817        if (1)  
     2818                // tmp matt: don't use that before origin objects are accounted for, currently the second ray is lost!! 
     2819                //!lastVssRay || 
     2820                //!(ray.mOrigin == lastVssRay->mTermination) || 
     2821                //!(ray.mTermination == lastVssRay->mOrigin))  
    28202822        { 
    28212823                viewCells.clear(); 
     
    28232825                // traverse the view space subdivision 
    28242826                CastLineSegment(origin, termination, viewCells); 
    2825                 lastVssRay = &ray; 
     2827 
     2828        lastVssRay = &ray; 
    28262829        } 
    28272830         
Note: See TracChangeset for help on using the changeset viewer.