Changeset 1926


Ignore:
Timestamp:
01/02/07 01:44:59 (17 years ago)
Author:
mattausch
Message:

worked on preprocessor with and without qt and threads

Location:
GTP/trunk/Lib/Vis
Files:
21 edited
2 moved

Legend:

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

    r1906 r1926  
    5858                Release Static = Release Static 
    5959                release_noqt = release_noqt 
     60                Release_qt = Release_qt 
    6061                Unicode Debug = Unicode Debug 
    6162                Unicode Release = Unicode Release 
     
    9495                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release Static.ActiveCfg = Release|Win32 
    9596                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release Static.Build.0 = Release|Win32 
    96                 {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.release_noqt.ActiveCfg = release_noqt|Win32 
    97                 {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.release_noqt.Build.0 = release_noqt|Win32 
     97                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.release_noqt.ActiveCfg = Release_qt|Win32 
     98                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.release_noqt.Build.0 = Release_qt|Win32 
     99                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release_qt.ActiveCfg = Release_qt|Win32 
     100                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release_qt.Build.0 = Release_qt|Win32 
    98101                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Unicode Debug.ActiveCfg = Debug|Win32 
    99102                {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Unicode Debug.Build.0 = Debug|Win32 
     
    136139                {101A7691-74F3-48B4-96A3-CF35578F5900}.Release Static.ActiveCfg = Release|Win32 
    137140                {101A7691-74F3-48B4-96A3-CF35578F5900}.Release Static.Build.0 = Release|Win32 
    138                 {101A7691-74F3-48B4-96A3-CF35578F5900}.release_noqt.ActiveCfg = release_noqt|Win32 
    139                 {101A7691-74F3-48B4-96A3-CF35578F5900}.release_noqt.Build.0 = release_noqt|Win32 
     141                {101A7691-74F3-48B4-96A3-CF35578F5900}.release_noqt.ActiveCfg = Release_qt|Win32 
     142                {101A7691-74F3-48B4-96A3-CF35578F5900}.release_noqt.Build.0 = Release_qt|Win32 
     143                {101A7691-74F3-48B4-96A3-CF35578F5900}.Release_qt.ActiveCfg = Release_qt|Win32 
     144                {101A7691-74F3-48B4-96A3-CF35578F5900}.Release_qt.Build.0 = Release_qt|Win32 
    140145                {101A7691-74F3-48B4-96A3-CF35578F5900}.Unicode Debug.ActiveCfg = Debug|Win32 
    141146                {101A7691-74F3-48B4-96A3-CF35578F5900}.Unicode Debug.Build.0 = Debug|Win32 
     
    178183                {7319E499-473D-4CE5-9983-725D6E68A55D}.Release Static.ActiveCfg = Release|Win32 
    179184                {7319E499-473D-4CE5-9983-725D6E68A55D}.Release Static.Build.0 = Release|Win32 
    180                 {7319E499-473D-4CE5-9983-725D6E68A55D}.release_noqt.ActiveCfg = release_noqt|Win32 
    181                 {7319E499-473D-4CE5-9983-725D6E68A55D}.release_noqt.Build.0 = release_noqt|Win32 
     185                {7319E499-473D-4CE5-9983-725D6E68A55D}.release_noqt.ActiveCfg = Release_qt|Win32 
     186                {7319E499-473D-4CE5-9983-725D6E68A55D}.release_noqt.Build.0 = Release_qt|Win32 
     187                {7319E499-473D-4CE5-9983-725D6E68A55D}.Release_qt.ActiveCfg = Release_qt|Win32 
     188                {7319E499-473D-4CE5-9983-725D6E68A55D}.Release_qt.Build.0 = Release_qt|Win32 
    182189                {7319E499-473D-4CE5-9983-725D6E68A55D}.Unicode Debug.ActiveCfg = Debug|Win32 
    183190                {7319E499-473D-4CE5-9983-725D6E68A55D}.Unicode Debug.Build.0 = Debug|Win32 
     
    222229                {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.release_noqt.ActiveCfg = Release_Internal|Win32 
    223230                {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.release_noqt.Build.0 = Release_Internal|Win32 
     231                {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Release_qt.ActiveCfg = Release_qt|Win32 
     232                {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Release_qt.Build.0 = Release_qt|Win32 
    224233                {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Unicode Debug.ActiveCfg = Debug|Win32 
    225234                {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Unicode Debug.Build.0 = Debug|Win32 
     
    264273                {EABCE292-D598-4600-A1C9-2591E7D62FDA}.release_noqt.ActiveCfg = release_noqt|Win32 
    265274                {EABCE292-D598-4600-A1C9-2591E7D62FDA}.release_noqt.Build.0 = release_noqt|Win32 
     275                {EABCE292-D598-4600-A1C9-2591E7D62FDA}.Release_qt.ActiveCfg = Release_qt|Win32 
     276                {EABCE292-D598-4600-A1C9-2591E7D62FDA}.Release_qt.Build.0 = Release_qt|Win32 
    266277                {EABCE292-D598-4600-A1C9-2591E7D62FDA}.Unicode Debug.ActiveCfg = Debug|Win32 
    267278                {EABCE292-D598-4600-A1C9-2591E7D62FDA}.Unicode Debug.Build.0 = Debug|Win32 
     
    306317                {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.release_noqt.ActiveCfg = release_noqt|Win32 
    307318                {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.release_noqt.Build.0 = release_noqt|Win32 
     319                {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.Release_qt.ActiveCfg = Release_qt|Win32 
     320                {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.Release_qt.Build.0 = Release_qt|Win32 
    308321                {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.Unicode Debug.ActiveCfg = Debug|Win32 
    309322                {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.Unicode Debug.Build.0 = Debug|Win32 
     
    346359                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release Static.ActiveCfg = Release|Win32 
    347360                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release Static.Build.0 = Release|Win32 
    348                 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.release_noqt.ActiveCfg = release_noqt|Win32 
    349                 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.release_noqt.Build.0 = release_noqt|Win32 
     361                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.release_noqt.ActiveCfg = Release_qt|Win32 
     362                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.release_noqt.Build.0 = Release_qt|Win32 
     363                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release_qt.ActiveCfg = Release_qt|Win32 
     364                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release_qt.Build.0 = Release_qt|Win32 
    350365                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Unicode Debug.ActiveCfg = Debug|Win32 
    351366                {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Unicode Debug.Build.0 = Debug|Win32 
     
    388403                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Release Static.ActiveCfg = Release|Win32 
    389404                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Release Static.Build.0 = Release|Win32 
    390                 {17F2C6F9-6101-430E-ABF4-71383868EF24}.release_noqt.ActiveCfg = release_noqt|Win32 
    391                 {17F2C6F9-6101-430E-ABF4-71383868EF24}.release_noqt.Build.0 = release_noqt|Win32 
     405                {17F2C6F9-6101-430E-ABF4-71383868EF24}.release_noqt.ActiveCfg = Release_qt|Win32 
     406                {17F2C6F9-6101-430E-ABF4-71383868EF24}.release_noqt.Build.0 = Release_qt|Win32 
     407                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Release_qt.ActiveCfg = Release_qt|Win32 
     408                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Release_qt.Build.0 = Release_qt|Win32 
    392409                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Unicode Debug.ActiveCfg = Debug|Win32 
    393410                {17F2C6F9-6101-430E-ABF4-71383868EF24}.Unicode Debug.Build.0 = Debug|Win32 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj

    r1826 r1926  
    268268                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    269269                </Configuration> 
     270                <Configuration 
     271                        Name="Release_qt|Win32" 
     272                        OutputDirectory="$(ConfigurationName)" 
     273                        IntermediateDirectory="$(ConfigurationName)" 
     274                        ConfigurationType="2" 
     275                        CharacterSet="2"> 
     276                        <Tool 
     277                                Name="VCCLCompilerTool" 
     278                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;..\include" 
     279                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 
     280                                RuntimeLibrary="2" 
     281                                UsePrecompiledHeader="0" 
     282                                WarningLevel="3" 
     283                                Detect64BitPortabilityProblems="TRUE" 
     284                                DebugInformationFormat="3"/> 
     285                        <Tool 
     286                                Name="VCCustomBuildTool"/> 
     287                        <Tool 
     288                                Name="VCLinkerTool" 
     289                                AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib" 
     290                                OutputFile="$(OutDir)/IVReader.dll" 
     291                                LinkIncremental="1" 
     292                                AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\GtpVisibility\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;" 
     293                                GenerateDebugInformation="FALSE" 
     294                                SubSystem="2" 
     295                                OptimizeReferences="2" 
     296                                EnableCOMDATFolding="2" 
     297                                ImportLibrary="$(OutDir)/IVReader.lib" 
     298                                TargetMachine="1"/> 
     299                        <Tool 
     300                                Name="VCMIDLTool"/> 
     301                        <Tool 
     302                                Name="VCPostBuildEventTool" 
     303                                CommandLine="copy $(OutDir)\$(TargetFileName) &quot;$(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)&quot;"/> 
     304                        <Tool 
     305                                Name="VCPreBuildEventTool"/> 
     306                        <Tool 
     307                                Name="VCPreLinkEventTool"/> 
     308                        <Tool 
     309                                Name="VCResourceCompilerTool"/> 
     310                        <Tool 
     311                                Name="VCWebServiceProxyGeneratorTool"/> 
     312                        <Tool 
     313                                Name="VCXMLDataGeneratorTool"/> 
     314                        <Tool 
     315                                Name="VCWebDeploymentTool"/> 
     316                        <Tool 
     317                                Name="VCManagedWrapperGeneratorTool"/> 
     318                        <Tool 
     319                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     320                </Configuration> 
    270321        </Configurations> 
    271322        <References> 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj

    r1826 r1926  
    347347                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    348348                </Configuration> 
     349                <Configuration 
     350                        Name="Release_qt|Win32" 
     351                        OutputDirectory="$(ConfigurationName)" 
     352                        IntermediateDirectory="$(ConfigurationName)" 
     353                        ConfigurationType="2" 
     354                        CharacterSet="2" 
     355                        WholeProgramOptimization="TRUE"> 
     356                        <Tool 
     357                                Name="VCCLCompilerTool" 
     358                                Optimization="3" 
     359                                GlobalOptimizations="TRUE" 
     360                                InlineFunctionExpansion="2" 
     361                                EnableIntrinsicFunctions="TRUE" 
     362                                ImproveFloatingPointConsistency="TRUE" 
     363                                FavorSizeOrSpeed="1" 
     364                                OmitFramePointers="TRUE" 
     365                                EnableFiberSafeOptimizations="TRUE" 
     366                                OptimizeForProcessor="0" 
     367                                OptimizeForWindowsApplication="TRUE" 
     368                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\src;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include" 
     369                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 
     370                                StringPooling="TRUE" 
     371                                RuntimeLibrary="2" 
     372                                BufferSecurityCheck="FALSE" 
     373                                EnableFunctionLevelLinking="TRUE" 
     374                                RuntimeTypeInfo="TRUE" 
     375                                UsePrecompiledHeader="0" 
     376                                WarningLevel="3" 
     377                                Detect64BitPortabilityProblems="TRUE" 
     378                                DebugInformationFormat="3"/> 
     379                        <Tool 
     380                                Name="VCCustomBuildTool"/> 
     381                        <Tool 
     382                                Name="VCLinkerTool" 
     383                                IgnoreImportLibrary="TRUE" 
     384                                AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib zdll.lib zziplib.lib Preprocessor.lib xerces-c_2.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib glew32.lib glew32s.lib IVReader.lib" 
     385                                OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll" 
     386                                Version="0.99" 
     387                                LinkIncremental="1" 
     388                                SuppressStartupBanner="TRUE" 
     389                                AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;" 
     390                                ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 
     391                                GenerateDebugInformation="FALSE" 
     392                                SubSystem="2" 
     393                                OptimizeReferences="2" 
     394                                EnableCOMDATFolding="2" 
     395                                ImportLibrary="$(OutDir)/Plugin_VisibilitySceneManager.lib" 
     396                                TargetMachine="1"/> 
     397                        <Tool 
     398                                Name="VCMIDLTool"/> 
     399                        <Tool 
     400                                Name="VCPostBuildEventTool" 
     401                                CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)"/> 
     402                        <Tool 
     403                                Name="VCPreBuildEventTool"/> 
     404                        <Tool 
     405                                Name="VCPreLinkEventTool"/> 
     406                        <Tool 
     407                                Name="VCResourceCompilerTool"/> 
     408                        <Tool 
     409                                Name="VCWebServiceProxyGeneratorTool"/> 
     410                        <Tool 
     411                                Name="VCXMLDataGeneratorTool"/> 
     412                        <Tool 
     413                                Name="VCWebDeploymentTool"/> 
     414                        <Tool 
     415                                Name="VCManagedWrapperGeneratorTool"/> 
     416                        <Tool 
     417                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     418                </Configuration> 
    349419        </Configurations> 
    350420        <References> 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj

    r1521 r1926  
    222222                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    223223                </Configuration> 
     224                <Configuration 
     225                        Name="Release_qt|Win32" 
     226                        OutputDirectory="$(ConfigurationName)" 
     227                        IntermediateDirectory="$(ConfigurationName)" 
     228                        ConfigurationType="4" 
     229                        CharacterSet="2"> 
     230                        <Tool 
     231                                Name="VCCLCompilerTool" 
     232                                GlobalOptimizations="TRUE" 
     233                                FavorSizeOrSpeed="1" 
     234                                OmitFramePointers="TRUE" 
     235                                OptimizeForWindowsApplication="TRUE" 
     236                                AdditionalIncludeDirectories="..\include;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\..\Preprocessing\src" 
     237                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB" 
     238                                RuntimeLibrary="2" 
     239                                RuntimeTypeInfo="TRUE" 
     240                                UsePrecompiledHeader="0" 
     241                                WarningLevel="3" 
     242                                Detect64BitPortabilityProblems="TRUE" 
     243                                DebugInformationFormat="3"/> 
     244                        <Tool 
     245                                Name="VCCustomBuildTool"/> 
     246                        <Tool 
     247                                Name="VCLibrarianTool" 
     248                                OutputFile="$(OutDir)/GtpVisibility.lib"/> 
     249                        <Tool 
     250                                Name="VCMIDLTool"/> 
     251                        <Tool 
     252                                Name="VCPostBuildEventTool"/> 
     253                        <Tool 
     254                                Name="VCPreBuildEventTool"/> 
     255                        <Tool 
     256                                Name="VCPreLinkEventTool"/> 
     257                        <Tool 
     258                                Name="VCResourceCompilerTool"/> 
     259                        <Tool 
     260                                Name="VCWebServiceProxyGeneratorTool"/> 
     261                        <Tool 
     262                                Name="VCXMLDataGeneratorTool"/> 
     263                        <Tool 
     264                                Name="VCManagedWrapperGeneratorTool"/> 
     265                        <Tool 
     266                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     267                </Configuration> 
    224268        </Configurations> 
    225269        <References> 
  • GTP/trunk/Lib/Vis/Preprocessing/EvalStats/EvalStats.vcproj

    r1239 r1926  
    199199                <Configuration 
    200200                        Name="Release Internal|Win32" 
     201                        OutputDirectory="$(ConfigurationName)" 
     202                        IntermediateDirectory="$(ConfigurationName)" 
     203                        ConfigurationType="1" 
     204                        CharacterSet="2"> 
     205                        <Tool 
     206                                Name="VCCLCompilerTool" 
     207                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 
     208                                RuntimeLibrary="0" 
     209                                UsePrecompiledHeader="3" 
     210                                WarningLevel="3" 
     211                                Detect64BitPortabilityProblems="TRUE" 
     212                                DebugInformationFormat="3"/> 
     213                        <Tool 
     214                                Name="VCCustomBuildTool"/> 
     215                        <Tool 
     216                                Name="VCLinkerTool" 
     217                                OutputFile="$(OutDir)/EvalStats.exe" 
     218                                LinkIncremental="1" 
     219                                GenerateDebugInformation="TRUE" 
     220                                SubSystem="1" 
     221                                OptimizeReferences="2" 
     222                                EnableCOMDATFolding="2" 
     223                                TargetMachine="1"/> 
     224                        <Tool 
     225                                Name="VCMIDLTool"/> 
     226                        <Tool 
     227                                Name="VCPostBuildEventTool"/> 
     228                        <Tool 
     229                                Name="VCPreBuildEventTool"/> 
     230                        <Tool 
     231                                Name="VCPreLinkEventTool"/> 
     232                        <Tool 
     233                                Name="VCResourceCompilerTool"/> 
     234                        <Tool 
     235                                Name="VCWebServiceProxyGeneratorTool"/> 
     236                        <Tool 
     237                                Name="VCXMLDataGeneratorTool"/> 
     238                        <Tool 
     239                                Name="VCWebDeploymentTool"/> 
     240                        <Tool 
     241                                Name="VCManagedWrapperGeneratorTool"/> 
     242                        <Tool 
     243                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     244                </Configuration> 
     245                <Configuration 
     246                        Name="Release_qt|Win32" 
    201247                        OutputDirectory="$(ConfigurationName)" 
    202248                        IntermediateDirectory="$(ConfigurationName)" 
     
    282328                                <FileConfiguration 
    283329                                        Name="Release Internal|Win32"> 
     330                                        <Tool 
     331                                                Name="VCCLCompilerTool" 
     332                                                UsePrecompiledHeader="1"/> 
     333                                </FileConfiguration> 
     334                                <FileConfiguration 
     335                                        Name="Release_qt|Win32"> 
    284336                                        <Tool 
    285337                                                Name="VCCLCompilerTool" 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.env

    r1746 r1926  
    1515        # stored sample rays 
    1616        samplesFilename rays.out 
    17         useGlRenderer false 
     17        useGlRenderer true 
     18        #useGlRenderer false 
    1819        useGlDebugger false 
    19 # 0 = INTERNAL          1 = MLRT 
    20  
     20 
     21        # 0 = INTERNAL  1 = MLRT 
    2122        rayCastMethod 0 
    2223         
     
    6768                pvs false 
    6869                rssTree false 
    69                 rays false 
    70                 numRays 2000 
    7170        } 
    7271 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh

    r1746 r1926  
    22 
    33PREPROCESSOR=../bin/release/preprocessor.exe 
     4#PREPROCESSOR=../bin/debug/preprocessor.exe 
    45 
    56if [ $# -ne 3 ] 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1924 r1926  
    133133mSceneGraph(NULL), 
    134134mRayCaster(NULL), 
    135 mStopComputation(false) 
     135mStopComputation(false), 
     136mThread(NULL) 
    136137{ 
    137138        Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlRenderer", mUseGlRenderer); 
     
    139140        // renderer will be constructed when the scene graph and viewcell manager will be known 
    140141        renderer = NULL; 
    141          
    142         Environment::GetSingleton()->GetBoolValue("Preprocessor.delayVisibilityComputation", 
    143                                                                                           mDelayVisibilityComputation); 
    144142         
    145143        Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlDebugger", mUseGlDebugger); 
     
    230228        filenames.push_back(string(str, pos, str.size() - pos)); 
    231229        return (int)filenames.size(); 
     230} 
     231 
     232 
     233void Preprocessor::SetThread(PreprocessorThread *t) 
     234{ 
     235        mThread = t; 
     236} 
     237 
     238 
     239PreprocessorThread *Preprocessor::GetThread() const  
     240{ 
     241        return mThread; 
    232242} 
    233243 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h

    r1900 r1926  
    111111        */ 
    112112        bool LoadSamples(VssRayContainer &samples, 
    113                                          ObjectContainer &objects) const; 
     113                ObjectContainer &objects) const; 
    114114 
    115115        /** Exports samples to file. 
     
    121121        bool ExportKdTree(const string filename); 
    122122 
    123   virtual bool 
    124   ExportRays(const char *filename, 
    125                          const VssRayContainer &vssRays, 
    126                          const int number 
    127                          ); 
    128          
     123        virtual bool 
     124                ExportRays(const char *filename, 
     125                const VssRayContainer &vssRays, 
     126                const int number 
     127                ); 
     128 
    129129        virtual int 
    130         GenerateRays(const int number, 
    131                                  SamplingStrategy &strategy, 
    132                                  SimpleRayContainer &rays); 
    133  
    134   virtual int GenerateRays(const int number, 
    135                                                    const int raysType, 
    136                                                    SimpleRayContainer &rays); 
     130                GenerateRays(const int number, 
     131                SamplingStrategy &strategy, 
     132                SimpleRayContainer &rays); 
     133 
     134        virtual int GenerateRays(const int number, 
     135                const int raysType, 
     136                SimpleRayContainer &rays); 
    137137 
    138138        bool GenerateRayBundle(SimpleRayContainer &rayBundle, 
     
    142142 
    143143        virtual void CastRays(SimpleRayContainer &rays, 
    144                                                   VssRayContainer &vssRays, 
    145                                                   const bool castDoubleRays, 
    146                                                   const bool pruneInvalidRays = true); 
     144                VssRayContainer &vssRays, 
     145                const bool castDoubleRays, 
     146                const bool pruneInvalidRays = true); 
    147147 
    148148        /** Returns a view cells manager of the given name. 
     
    157157 
    158158        Intersectable *GetParentObject(const int index) const; 
    159 Vector3 GetParentNormal(const int index) const; 
     159        Vector3 GetParentNormal(const int index) const; 
     160 
     161        /** Sets a Preprocessor thread. 
     162        */ 
     163        void SetThread(PreprocessorThread *t); 
     164 
     165        /** Returns a Preprocessor thread. 
     166        */ 
     167        PreprocessorThread *GetThread() const; 
     168 
     169 
     170 
    160171        //////////////////////////////////////////////// 
    161172 
     
    205216        int mPass; 
    206217  
    207     bool mDelayVisibilityComputation; 
    208218        bool mStopComputation; 
    209219   
    210220        bool mExportObj; 
    211221 
    212   bool mExportRays; 
    213   int mExportNumRays; 
     222        bool mExportRays; 
     223        int mExportNumRays; 
    214224 
    215225        ofstream mStats; 
    216226 
    217   GlRendererBuffer *renderer; 
    218  
    219   void SetThread(PreprocessorThread *t) { 
    220         mThread = t; 
    221   } 
    222  
    223   PreprocessorThread *GetThread() const { 
    224         return mThread; 
    225   } 
     227        GlRendererBuffer *renderer; 
     228 
    226229 
    227230protected: 
     
    255258        bool mUseViewSpaceBox; 
    256259 
    257   PreprocessorThread *mThread; 
     260        PreprocessorThread *mThread; 
    258261}; 
    259262 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r1894 r1926  
    302302                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    303303                </Configuration> 
     304                <Configuration 
     305                        Name="Release_qt|Win32" 
     306                        OutputDirectory="$(ConfigurationName)" 
     307                        IntermediateDirectory="$(ConfigurationName)" 
     308                        ConfigurationType="4" 
     309                        CharacterSet="2"> 
     310                        <Tool 
     311                                Name="VCCLCompilerTool" 
     312                                Optimization="3" 
     313                                GlobalOptimizations="TRUE" 
     314                                InlineFunctionExpansion="2" 
     315                                EnableIntrinsicFunctions="TRUE" 
     316                                FavorSizeOrSpeed="1" 
     317                                OmitFramePointers="TRUE" 
     318                                EnableFiberSafeOptimizations="TRUE" 
     319                                OptimizeForProcessor="0" 
     320                                OptimizeForWindowsApplication="TRUE" 
     321                                AdditionalIncludeDirectories="..\include;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;" 
     322                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;USE_QT" 
     323                                ExceptionHandling="TRUE" 
     324                                RuntimeLibrary="2" 
     325                                DisableLanguageExtensions="FALSE" 
     326                                ForceConformanceInForLoopScope="FALSE" 
     327                                RuntimeTypeInfo="TRUE" 
     328                                UsePrecompiledHeader="0" 
     329                                BrowseInformation="1" 
     330                                WarningLevel="2" 
     331                                Detect64BitPortabilityProblems="TRUE" 
     332                                DebugInformationFormat="3"/> 
     333                        <Tool 
     334                                Name="VCCustomBuildTool"/> 
     335                        <Tool 
     336                                Name="VCLibrarianTool" 
     337                                OutputFile="..\lib\Release\$(ProjectName).lib"/> 
     338                        <Tool 
     339                                Name="VCMIDLTool"/> 
     340                        <Tool 
     341                                Name="VCPostBuildEventTool"/> 
     342                        <Tool 
     343                                Name="VCPreBuildEventTool"/> 
     344                        <Tool 
     345                                Name="VCPreLinkEventTool"/> 
     346                        <Tool 
     347                                Name="VCResourceCompilerTool"/> 
     348                        <Tool 
     349                                Name="VCWebServiceProxyGeneratorTool"/> 
     350                        <Tool 
     351                                Name="VCXMLDataGeneratorTool"/> 
     352                        <Tool 
     353                                Name="VCManagedWrapperGeneratorTool"/> 
     354                        <Tool 
     355                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     356                </Configuration> 
    304357        </Configurations> 
    305358        <References> 
     
    586639                                                Outputs=""/> 
    587640                                </FileConfiguration> 
     641                                <FileConfiguration 
     642                                        Name="Release_qt|Win32"> 
     643                                        <Tool 
     644                                                Name="VCCustomBuildTool" 
     645                                                Description="" 
     646                                                CommandLine="" 
     647                                                Outputs=""/> 
     648                                </FileConfiguration> 
    588649                        </File> 
    589650                        <File 
     
    638699                                                Outputs=""/> 
    639700                                </FileConfiguration> 
     701                                <FileConfiguration 
     702                                        Name="Release_qt|Win32"> 
     703                                        <Tool 
     704                                                Name="VCCustomBuildTool" 
     705                                                Description="" 
     706                                                CommandLine="" 
     707                                                Outputs=""/> 
     708                                </FileConfiguration> 
    640709                        </File> 
    641710                        <File 
     
    734803                        <File 
    735804                                RelativePath="..\src\Tetrahedron3.h"> 
     805                        </File> 
     806                        <File 
     807                                RelativePath=".\Trackball.cpp"> 
     808                        </File> 
     809                        <File 
     810                                RelativePath=".\Trackball.h"> 
    736811                        </File> 
    737812                        <File 
  • GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp

    r1867 r1926  
    6161 
    6262 
    63 /*PreprocessorThread *PreprocessorThreadFactory::Create(const int threadType) 
    64 { 
    65         return NULL; 
    66 }*/ 
    67  
    6863} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.h

    r1867 r1926  
    1515{ 
    1616public: 
    17   static vector<PreprocessorThread *> sThreads; 
    18    
    19   PreprocessorThread(Preprocessor *p); 
    20   virtual ~PreprocessorThread(); 
    21    
    22   virtual void InitThread() { 
    23         sThreads.push_back(this); 
    24   } 
    25   virtual void RunThread() {} 
    26    
    27   virtual void Main(); 
     17        static vector<PreprocessorThread *> sThreads; 
    2818 
    29   // This function has to be defined by the thread library used... 
    30   virtual int GetCurrentThreadId() const = 0; 
     19        PreprocessorThread(Preprocessor *p); 
     20        virtual ~PreprocessorThread(); 
     21 
     22        virtual void InitThread()  
     23        { 
     24                sThreads.push_back(this); 
     25        } 
     26 
     27        virtual void RunThread() {} 
     28 
     29        virtual void Main(); 
     30 
     31        // This function has to be defined by the thread library used... 
     32        virtual int GetCurrentThreadId() const = 0; 
    3133 
    3234protected: 
    33    
    34   Preprocessor *mPreprocessor; 
     35 
     36        Preprocessor *mPreprocessor; 
    3537}; 
    3638 
    37 /*class PreprocessorThreadFactory 
     39 
     40class DummyPreprocessorThread: public PreprocessorThread 
    3841{ 
    39         PreprocessorThread *Create(const int threadType); 
    40 }*/ 
     42public: 
     43 
     44        DummyPreprocessorThread(Preprocessor *p): PreprocessorThread(p) 
     45        {} 
     46         
     47        // This function has to be defined by the thread library used... 
     48        virtual int GetCurrentThreadId() const 
     49        { 
     50                return 0; 
     51        } 
     52}; 
    4153 
    4254} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.cpp

    r1925 r1926  
    2828const int depthMapSize = 512; 
    2929 
    30 //static vector<OcclusionQuery *> sQueries; 
    31  
    3230QtGlRendererWidget *rendererWidget = NULL; 
    3331QtGlDebuggerWidget *debuggerWidget = NULL; 
     
    5553        mViewCellsManager->GetViewPoint(mViewPoint); 
    5654        sample.mPosition = mViewPoint; 
    57         //cout << "viewpoint: " << mViewPoint << endl; 
    5855 
    5956        // take a render cost sample by rendering a cube 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.h

    r1925 r1926  
    3737{ 
    3838        Q_OBJECT 
     39 
    3940public: 
    4041        QtGlRendererBuffer(const int w, 
     
    6869                const int threshold = 0); 
    6970 
    70  
    71   void 
    72   EvalPvsStat(); 
    73  
    74   void 
    75   ClearErrorBuffer(); 
    76    
    77  
    78   virtual int GetWidth() const { return width(); } 
    79   virtual int GetHeight() const { return height(); } 
    80  
    81  
    82   
    83   void SampleBeamContributions( 
    84                                                            Intersectable *sourceObject, 
    85                                                            Beam &beam, 
    86                                                            const int samples, 
    87                                                            BeamSampleStatistics &stat 
    88                                                            ); 
    89  
    90   void 
    91   SampleViewpointContributions( 
    92                                                            Intersectable *sourceObject, 
    93                                                            const Vector3 viewPoint, 
    94                                                            Beam &beam, 
    95                                                            const int desiredSamples, 
    96                                                            BeamSampleStatistics &stat 
    97                                                            ); 
    98  
    99   void InitGL(); 
    100  
    101   /** Computes rays from information gained with hw sampling- 
    102   */ 
    103   void ComputeRays(Intersectable *sourceObj, VssRayContainer &rays); 
    104  
    105   float 
    106   GetPixelError(int &pvsSize); 
    107  
    108   int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const; 
    109       
    110     
     71        void 
     72                EvalPvsStat(); 
     73 
     74        void 
     75                ClearErrorBuffer(); 
     76 
     77        virtual int GetWidth() const { return width(); } 
     78        virtual int GetHeight() const { return height(); } 
     79 
     80        void SampleBeamContributions( 
     81                Intersectable *sourceObject, 
     82                Beam &beam, 
     83                const int samples, 
     84                BeamSampleStatistics &stat 
     85                ); 
     86 
     87        void 
     88                SampleViewpointContributions( 
     89                Intersectable *sourceObject, 
     90                const Vector3 viewPoint, 
     91                Beam &beam, 
     92                const int desiredSamples, 
     93                BeamSampleStatistics &stat 
     94                ); 
     95 
     96        void InitGL(); 
     97 
     98        /** Computes rays from information gained with hw sampling- 
     99        */ 
     100        void ComputeRays(Intersectable *sourceObj, VssRayContainer &rays); 
     101 
     102        float 
     103                GetPixelError(int &pvsSize); 
     104 
     105        int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const; 
     106 
     107 
    111108private: 
    112          
     109 
    113110        void SetupProjectionForViewPoint(const Vector3 &viewPoint,  
    114                                                                          const Beam &beam,  
    115                                                                          Intersectable *sourceObject); 
    116  
    117  
    118 public: 
    119   signals: 
     111                const Beam &beam,  
     112                Intersectable *sourceObject); 
     113 
     114 
     115public: 
     116signals: 
    120117        void UpdatePvsErrorItem(int i, GlRendererBuffer::PvsErrorEntry &); 
    121118}; 
     
    124121class __declspec(dllexport) QtRendererControlWidget : public QWidget 
    125122{ 
    126   Q_OBJECT 
    127 public: 
    128  
    129   QListWidget *mPvsErrorWidget; 
    130  
    131   QtRendererControlWidget(QWidget * parent = 0, Qt::WFlags f = 0); 
    132  
    133   public slots: 
    134  
    135   void FocusNextPvsErrorFrame(); 
    136   void UpdatePvsErrorItem(int i, 
    137                                                   GlRendererBuffer::PvsErrorEntry &); 
    138  
    139   signals: 
    140    
    141   void SetViewCellGranularity(int); 
    142   void SetSceneCut(int); 
    143   void SetTopDistance(int); 
    144   void SetVisibilityFilterSize(int); 
    145   void SetSpatialFilterSize(int); 
    146  
    147   void SetRenderFilter(bool); 
    148   void SetUseFilter(bool); 
    149   void SetUseSpatialFilter(bool); 
    150   void SetRenderErrors(bool); 
    151   void SetShowViewCells(bool); 
    152   void SetShowRenderCost(bool); 
    153   void SetShowPvsSizes(bool); 
    154   void SetTopView(bool); 
    155   void SetCutViewCells(bool); 
    156   void SetCutScene(bool); 
    157  
    158    
    159 }; 
     123        Q_OBJECT 
     124public: 
     125 
     126        QListWidget *mPvsErrorWidget; 
     127 
     128        QtRendererControlWidget(QWidget * parent = 0, Qt::WFlags f = 0); 
     129 
     130public slots: 
     131 
     132        void FocusNextPvsErrorFrame(); 
     133        void UpdatePvsErrorItem(int i, 
     134                GlRendererBuffer::PvsErrorEntry &); 
     135 
     136signals: 
     137 
     138        void SetViewCellGranularity(int); 
     139        void SetSceneCut(int); 
     140        void SetTopDistance(int); 
     141        void SetVisibilityFilterSize(int); 
     142        void SetSpatialFilterSize(int); 
     143 
     144        void SetRenderFilter(bool); 
     145        void SetUseFilter(bool); 
     146        void SetUseSpatialFilter(bool); 
     147        void SetRenderErrors(bool); 
     148        void SetShowViewCells(bool); 
     149        void SetShowRenderCost(bool); 
     150        void SetShowPvsSizes(bool); 
     151        void SetTopView(bool); 
     152        void SetCutViewCells(bool); 
     153        void SetCutScene(bool); 
     154 
     155 
     156}; 
     157 
    160158 
    161159class __declspec(dllexport) QtGlRendererWidget : public QGLWidget, public GlRendererWidget 
    162160{ 
    163   Q_OBJECT 
    164 public: 
    165  
    166   // point of the last mouse click used for movement in the scene 
    167   Vector3 mousePoint; 
    168  
    169   bool mTopView; 
    170   bool mRenderViewCells; 
    171   bool mCutViewCells; 
    172   bool mCutScene; 
    173   bool mRenderErrors; 
    174   bool mRenderFilter; 
    175   bool mUseFilter; 
    176   bool mUseSpatialFilter; 
    177   bool mShowRenderCost; 
    178    
    179   bool mShowPvsSizes; 
    180   float mSpatialFilterSize; 
    181    
    182   Plane3 mSceneCutPlane; 
    183   float mTopDistance; 
    184  
    185   // some statistics 
    186   int mPvsSize; 
    187   float mRenderError; 
    188  
    189   QtRendererControlWidget *mControlWidget; 
    190    
    191   QtGlRendererWidget(SceneGraph *sceneGraph, 
    192                                    ViewCellsManager *viewcells, 
    193                                    KdTree *tree, 
    194                                    QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WFlags f = 0 
    195                                    ); 
    196  
    197   QtGlRendererWidget() {}; 
    198  
    199   virtual void SetupCamera(); 
    200  
    201   void initializeGL() { 
    202         InitGL(); 
    203   } 
    204   void resizeGL(int w, int h); 
    205   void paintGL(); 
    206   void timerEvent(QTimerEvent *) { 
    207           update(); 
    208   } 
    209  
    210   void mousePressEvent(QMouseEvent *); 
    211   void mouseReleaseEvent(QMouseEvent *); 
    212   void mouseMoveEvent(QMouseEvent *); 
    213  
    214   void keyPressEvent ( QKeyEvent * e ) ; 
    215  
    216   void 
    217   RenderPvs(); 
    218  
    219   float 
    220   RenderErrors(); 
    221   void 
    222   RenderInfo(); 
    223  
    224   virtual int GetWidth() const { return width(); } 
    225   virtual int GetHeight() const { return height(); } 
    226  
    227  virtual void 
    228   SetupProjection(const int w, const int h, const float angle = 70.0f); 
    229  
    230   void 
    231   RenderViewCells(); 
    232  
    233  public slots: 
    234  
    235  void SetRenderErrors(bool b) { 
    236    mRenderErrors = b; 
    237    updateGL(); 
    238  } 
    239  
    240  void SetRenderFilter(bool b) { 
    241    mRenderFilter = b; 
    242    updateGL(); 
    243  } 
    244  
    245   void SetUseFilter(bool b) { 
    246    mUseFilter = b; 
    247    updateGL(); 
    248  } 
    249  
    250   void SetUseSpatialFilter(bool b) { 
    251         mUseSpatialFilter = b; 
    252         updateGL(); 
    253   } 
    254  
    255    
    256   void 
    257   SetViewCellGranularity(int number); 
    258    
    259   void 
    260   SetVisibilityFilterSize(int number); 
    261  
    262   void 
    263   SetSpatialFilterSize(int number); 
    264    
    265   void 
    266   SetSceneCut(int cut); 
    267    
    268   void 
    269   SetTopDistance(int dist); 
    270    
    271   void SetShowViewCells(bool b) { 
    272         mRenderViewCells = b; 
    273         updateGL(); 
    274   } 
    275  
    276   void SetShowRenderCost(bool b) { 
    277         mShowRenderCost = b; 
    278         updateGL(); 
    279   } 
    280  
    281   void SetShowPvsSizes(bool b) { 
    282         mShowPvsSizes = b; 
    283         updateGL(); 
    284   } 
    285  
    286   void SetTopView(bool b) { 
    287         mTopView = b; 
    288         updateGL(); 
    289   } 
    290  
    291   void SetCutViewCells(bool b) { 
    292         mCutViewCells = b; 
    293         updateGL(); 
    294   } 
    295   void SetCutScene(bool b) { 
    296         mCutScene = b; 
    297         updateGL(); 
    298   } 
    299  
     161        Q_OBJECT 
     162public: 
     163 
     164        // point of the last mouse click used for movement in the scene 
     165        Vector3 mousePoint; 
     166 
     167        bool mTopView; 
     168        bool mRenderViewCells; 
     169        bool mCutViewCells; 
     170        bool mCutScene; 
     171        bool mRenderErrors; 
     172        bool mRenderFilter; 
     173        bool mUseFilter; 
     174        bool mUseSpatialFilter; 
     175        bool mShowRenderCost; 
     176 
     177        bool mShowPvsSizes; 
     178        float mSpatialFilterSize; 
     179 
     180        Plane3 mSceneCutPlane; 
     181        float mTopDistance; 
     182 
     183        // some statistics 
     184        int mPvsSize; 
     185        float mRenderError; 
     186 
     187        QtRendererControlWidget *mControlWidget; 
     188 
     189        QtGlRendererWidget(SceneGraph *sceneGraph, 
     190                ViewCellsManager *viewcells, 
     191                KdTree *tree, 
     192                QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WFlags f = 0 
     193                ); 
     194 
     195        QtGlRendererWidget() {}; 
     196 
     197        virtual void SetupCamera(); 
     198 
     199        void initializeGL() { 
     200                InitGL(); 
     201        } 
     202        void resizeGL(int w, int h); 
     203        void paintGL(); 
     204        void timerEvent(QTimerEvent *) { 
     205                update(); 
     206        } 
     207 
     208        void mousePressEvent(QMouseEvent *); 
     209        void mouseReleaseEvent(QMouseEvent *); 
     210        void mouseMoveEvent(QMouseEvent *); 
     211 
     212        void keyPressEvent ( QKeyEvent * e ) ; 
     213 
     214        void 
     215                RenderPvs(); 
     216 
     217        float 
     218                RenderErrors(); 
     219        void 
     220                RenderInfo(); 
     221 
     222        virtual int GetWidth() const { return width(); } 
     223        virtual int GetHeight() const { return height(); } 
     224 
     225        virtual void 
     226                SetupProjection(const int w, const int h, const float angle = 70.0f); 
     227 
     228        void 
     229                RenderViewCells(); 
     230 
     231public slots: 
     232 
     233        void SetRenderErrors(bool b) { 
     234                mRenderErrors = b; 
     235                updateGL(); 
     236        } 
     237 
     238        void SetRenderFilter(bool b) { 
     239                mRenderFilter = b; 
     240                updateGL(); 
     241        } 
     242 
     243        void SetUseFilter(bool b) { 
     244                mUseFilter = b; 
     245                updateGL(); 
     246        } 
     247 
     248        void SetUseSpatialFilter(bool b) { 
     249                mUseSpatialFilter = b; 
     250                updateGL(); 
     251        } 
     252 
     253 
     254        void 
     255                SetViewCellGranularity(int number); 
     256 
     257        void 
     258                SetVisibilityFilterSize(int number); 
     259 
     260        void 
     261                SetSpatialFilterSize(int number); 
     262 
     263        void 
     264                SetSceneCut(int cut); 
     265 
     266        void 
     267                SetTopDistance(int dist); 
     268 
     269        void SetShowViewCells(bool b) { 
     270                mRenderViewCells = b; 
     271                updateGL(); 
     272        } 
     273 
     274        void SetShowRenderCost(bool b) { 
     275                mShowRenderCost = b; 
     276                updateGL(); 
     277        } 
     278 
     279        void SetShowPvsSizes(bool b) { 
     280                mShowPvsSizes = b; 
     281                updateGL(); 
     282        } 
     283 
     284        void SetTopView(bool b) { 
     285                mTopView = b; 
     286                updateGL(); 
     287        } 
     288 
     289        void SetCutViewCells(bool b) { 
     290                mCutViewCells = b; 
     291                updateGL(); 
     292        } 
     293        void SetCutScene(bool b) { 
     294                mCutScene = b; 
     295                updateGL(); 
     296        } 
     297 
     298        // matt: dummy file 
     299        void RenderRenderCost() {} 
    300300 
    301301}; 
     
    306306        Q_OBJECT 
    307307public: 
    308     QtGlDebuggerWidget(QtGlRendererBuffer *buf, QWidget *parent = NULL); 
    309     ~QtGlDebuggerWidget(); 
    310     void initializeGL(); 
    311     void resizeGL(int w, int h); 
    312     void paintGL(); 
    313     void timerEvent(QTimerEvent *) { update(); } 
    314     void mousePressEvent(QMouseEvent *) { killTimer(timerId); } 
    315     void mouseReleaseEvent(QMouseEvent *) { timerId = startTimer(20); } 
    316  
    317     void initCommon(); 
    318     void initPbuffer(); 
    319  
    320    
    321          QtGlRendererBuffer *mRenderBuffer; 
    322  
    323          Beam mBeam; 
    324          int mSamples; 
    325          Intersectable *mSourceObject; 
     308        QtGlDebuggerWidget(QtGlRendererBuffer *buf, QWidget *parent = NULL); 
     309        ~QtGlDebuggerWidget(); 
     310        void initializeGL(); 
     311        void resizeGL(int w, int h); 
     312        void paintGL(); 
     313        void timerEvent(QTimerEvent *) { update(); } 
     314        void mousePressEvent(QMouseEvent *) { killTimer(timerId); } 
     315        void mouseReleaseEvent(QMouseEvent *) { timerId = startTimer(20); } 
     316 
     317        void initCommon(); 
     318        void initPbuffer(); 
     319 
     320 
     321        QtGlRendererBuffer *mRenderBuffer; 
     322 
     323        Beam mBeam; 
     324        int mSamples; 
     325        Intersectable *mSourceObject; 
    326326 
    327327private: 
    328     GLuint dynamicTexture; 
    329     int timerId; 
     328 
     329        GLuint dynamicTexture; 
     330        int timerId; 
    330331}; 
    331332 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.sln

    r1252 r1926  
    88                Debug = Debug 
    99                Release = Release 
     10                release_internal = release_internal 
    1011        EndGlobalSection 
    1112        GlobalSection(ProjectConfiguration) = postSolution 
     
    1415                {B85DC7B1-58B6-4912-BD64-8B452630A368}.Release.ActiveCfg = Release|Win32 
    1516                {B85DC7B1-58B6-4912-BD64-8B452630A368}.Release.Build.0 = Release|Win32 
     17                {B85DC7B1-58B6-4912-BD64-8B452630A368}.release_internal.ActiveCfg = release_internal|Win32 
     18                {B85DC7B1-58B6-4912-BD64-8B452630A368}.release_internal.Build.0 = release_internal|Win32 
    1619        EndGlobalSection 
    1720        GlobalSection(ExtensibilityGlobals) = postSolution 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.vcproj

    r1925 r1926  
    9090                        <Tool 
    9191                                Name="VCLinkerTool" 
    92                                 AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4.lib Qt3Support4.lib QAxContainer.lib QtCore4.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib RTScene.lib RTWorld.lib cgGL.lib" 
    93                                 OutputFile="$(OutDir)/QtGlRenderer.dll" 
     92                                AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4.lib Qt3Support4.lib QAxContainer.lib QtCore4.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib" 
     93                                OutputFile="Release/QtGlRenderer.dll" 
     94                                LinkIncremental="1" 
     95                                AdditionalLibraryDirectories="&quot;..\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;$(CG_LIB_PATH)&quot;;&quot;$(QTDIR)\lib&quot;" 
     96                                GenerateDebugInformation="FALSE" 
     97                                SubSystem="2" 
     98                                OptimizeReferences="2" 
     99                                EnableCOMDATFolding="2" 
     100                                ImportLibrary="$(OutDir)/QtGlRenderer.lib" 
     101                                TargetMachine="1"/> 
     102                        <Tool 
     103                                Name="VCMIDLTool"/> 
     104                        <Tool 
     105                                Name="VCPostBuildEventTool" 
     106                                Description="&quot;copy dll to preprocessor dir&quot;" 
     107                                CommandLine="copy $(OutDir)\*.dll ..\..\bin\"/> 
     108                        <Tool 
     109                                Name="VCPreBuildEventTool"/> 
     110                        <Tool 
     111                                Name="VCPreLinkEventTool"/> 
     112                        <Tool 
     113                                Name="VCResourceCompilerTool"/> 
     114                        <Tool 
     115                                Name="VCWebServiceProxyGeneratorTool"/> 
     116                        <Tool 
     117                                Name="VCXMLDataGeneratorTool"/> 
     118                        <Tool 
     119                                Name="VCWebDeploymentTool"/> 
     120                        <Tool 
     121                                Name="VCManagedWrapperGeneratorTool"/> 
     122                        <Tool 
     123                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     124                </Configuration> 
     125                <Configuration 
     126                        Name="release_internal|Win32" 
     127                        OutputDirectory="$(ConfigurationName)" 
     128                        IntermediateDirectory="$(ConfigurationName)" 
     129                        ConfigurationType="2" 
     130                        CharacterSet="2"> 
     131                        <Tool 
     132                                Name="VCCLCompilerTool" 
     133                                AdditionalIncludeDirectories="..\..\src;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(CG_INC_PATH)&quot;" 
     134                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;QTGLRENDERER_EXPORTS" 
     135                                RuntimeLibrary="2" 
     136                                UsePrecompiledHeader="0" 
     137                                WarningLevel="3" 
     138                                Detect64BitPortabilityProblems="TRUE" 
     139                                DebugInformationFormat="3"/> 
     140                        <Tool 
     141                                Name="VCCustomBuildTool" 
     142                                Description="Performing moc on $(InputName).h" 
     143                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp 
     144" 
     145                                Outputs="$(InputDir) moc_$(InputName).cpp"/> 
     146                        <Tool 
     147                                Name="VCLinkerTool" 
     148                                AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4.lib Qt3Support4.lib QAxContainer.lib QtCore4.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib RTScene.lib RTWorld.lib" 
     149                                OutputFile="Release/QtGlRenderer.dll" 
    94150                                LinkIncremental="1" 
    95151                                AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\lib;&quot;$(CG_LIB_PATH)&quot;;..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;..\..\lib\$(ConfigurationName)&quot;;..\..\MultiLevelRayTracing\RTScene\Release;..\..\MultiLevelRayTracing\RTWorld\Release" 
     
    135191                        </File> 
    136192                        <File 
     193                                RelativePath=".\moc_QtGlViewer.cpp"> 
     194                        </File> 
     195                        <File 
    137196                                RelativePath=".\QtGlRenderer.cpp"> 
    138197                        </File> 
    139198                        <File 
    140199                                RelativePath=".\QtGlRendererDll.cpp"> 
     200                        </File> 
     201                        <File 
     202                                RelativePath=".\QtGlViewer.cpp"> 
    141203                        </File> 
    142204                </Filter> 
     
    154216                                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp 
    155217" 
     218                                                Outputs="$(InputDir) moc_$(InputName).cpp"/> 
     219                                </FileConfiguration> 
     220                                <FileConfiguration 
     221                                        Name="release_internal|Win32"> 
     222                                        <Tool 
     223                                                Name="VCCustomBuildTool" 
     224                                                Description="Performing moc on $(InputName).h" 
     225                                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp 
     226" 
     227                                                Outputs="$(InputDir) moc_$(InputName).cpp"/> 
     228                                </FileConfiguration> 
     229                        </File> 
     230                        <File 
     231                                RelativePath=".\QtGlViewer.h"> 
     232                                <FileConfiguration 
     233                                        Name="Release|Win32"> 
     234                                        <Tool 
     235                                                Name="VCCustomBuildTool" 
     236                                                Description="Performing moc on $(InputName).h" 
     237                                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp" 
    156238                                                Outputs="$(InputDir) moc_$(InputName).cpp"/> 
    157239                                </FileConfiguration> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlViewer.cpp

    r1833 r1926  
    77 
    88// C++ standard headers 
    9 #include <cmath> 
     9//#include <cmath> 
    1010 
    1111// local headers 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlViewer.h

    r1833 r1926  
    33 
    44#include <QtOpenGL> 
    5  
     5#include <QWaitCondition> 
    66 
    77namespace GtpVisibilityPreprocessor { 
     
    99class QtGlRendererWidget; 
    1010 
    11 class QtGlViewer : public QGLWidget 
    12 { 
    13          
    14         Q_OBJECT 
    1511 
    16         friend class QtGlRendererWidget; 
    17         friend class GlRenderer; 
     12class __declspec(dllexport) QtGlViewer: public QGLWidget 
     13{        
     14        //Q_OBJECT 
    1815 
    1916public: 
     17         
     18        QtGlViewer(QWidget *parent, QtGlRendererWidget *renderer); 
     19 
     20        virtual ~QtGlViewer() {}; 
     21 
     22        QSize minimumSizeHint() const; 
     23        QSize sizeHint() const; 
     24 
     25        // This method has to be rendefined by all renderer implementations 
     26        virtual void RenderScene(); 
     27 
    2028        QtGlRendererWidget *mRenderer; 
    21          
    22         QtGlViewer(QWidget *parent, 
    23                                                  QtGlRendererWidget *renderer); 
    24          
    25   virtual ~QtGlViewer(){}; 
    26    
    27   QSize minimumSizeHint() const; 
    28   QSize sizeHint() const; 
    29    
    30   // This method has to be rendefined by all renderer implementations 
    31   virtual void RenderScene(); 
    32    
     29 
    3330protected: 
    34   void initializeGL(); 
    35   void paintGL(); 
    36   void resizeGL(int width, int height); 
    37   void mousePressEvent(QMouseEvent *event); 
    38   void mouseMoveEvent(QMouseEvent *event); 
     31 
     32        void initializeGL(); 
     33        void paintGL(); 
     34        void resizeGL(int width, int height); 
     35        void mousePressEvent(QMouseEvent *event); 
     36        void mouseMoveEvent(QMouseEvent *event); 
    3937 
    4038        void keyPressEvent ( QKeyEvent * e ); 
    41          
    42   bool mWireframe; 
     39 
     40        bool mWireframe; 
    4341 
    4442private: 
    4543 
    4644        float manipulatorLastQuat[4]; 
    47   float scale; 
    48   QPoint lastPos; 
     45        float scale; 
     46         
     47        QPoint lastPos; 
    4948 
     49        friend class QtGlRendererWidget; 
     50        friend class GlRenderer; 
    5051}; 
    5152 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtPreprocessorThread.cpp

    r1867 r1926  
    1 #ifdef GTP_INTERNAL 
    2 #ifndef NO_QT 
     1#ifdef USE_QT 
     2 
    33#include <QApplication> 
    44#include "QtPreprocessorThread.h" 
     
    1313 
    1414QtPreprocessorThread::QtPreprocessorThread(Preprocessor *p, 
    15                                                                                    QObject *parent):PreprocessorThread(p), 
    16                                                                                                                         QThread(parent) 
    17                                                                                                                          
     15                                                                                   QObject *parent) 
     16: PreprocessorThread(p), QThread(parent)                                                                                                                         
    1817{ 
    19   if (p->mQuitOnFinish) 
     18        if (p->mQuitOnFinish) 
    2019        { 
    21           connect(this, SIGNAL(finished()), qApp, SLOT(closeAllWindows(void))); 
     20                connect(this, SIGNAL(finished()), qApp, SLOT(closeAllWindows(void))); 
    2221        } 
    2322} 
     
    2625QtPreprocessorThread::~QtPreprocessorThread() 
    2726{ 
    28   cerr<<"Preprocessor thread destructor...\n"; 
     27  cerr << "Preprocessor thread destructor...\n"; 
    2928} 
     29 
    3030 
    3131int 
     
    4141} 
    4242 
    43  
    4443#endif 
    45 #endif 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtPreprocessorThread.h

    r1867 r1926  
    22#define __QT_PREPROCESSOR_THREAD_H 
    33 
    4 #ifndef NO_QT 
     4#ifdef USE_QT 
     5 
    56#include <QThread> 
    67#include "PreprocessorThread.h" 
     
    1314{ 
    1415public: 
    15   QtPreprocessorThread(Preprocessor *p, QObject *parent = 0); 
    16   ~QtPreprocessorThread(); 
    17    
    18   void InitThread() { 
    19         PreprocessorThread::InitThread(); 
    20   } 
    21   void RunThread() { 
    22         start(QThread::LowPriority); 
    23   } 
     16        QtPreprocessorThread(Preprocessor *p, QObject *parent = 0); 
     17        ~QtPreprocessorThread(); 
    2418 
    25   // This function has to be defined by the thread library used... 
    26   virtual int GetCurrentThreadId() const; 
     19        void InitThread() { 
     20                PreprocessorThread::InitThread(); 
     21        } 
     22        void RunThread() { 
     23                start(QThread::LowPriority); 
     24        } 
    2725 
    28    
     26        // This function has to be defined by the thread library used... 
     27        virtual int GetCurrentThreadId() const; 
     28 
    2929protected: 
    30   void run() { 
    31         Main(); 
    32   } 
     30        void run() { 
     31                Main(); 
     32        } 
    3333}; 
    3434 
    3535} 
     36 
    3637#endif 
    3738#endif 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp

    r1900 r1926  
    4040  Environment::GetSingleton()->GetBoolValue("RssPreprocessor.Export.pvs", mExportPvs); 
    4141  Environment::GetSingleton()->GetBoolValue("RssPreprocessor.Export.rssTree", mExportRssTree); 
    42   Environment::GetSingleton()->GetBoolValue("RssPreprocessor.Export.rays", mExportRays); 
    43   Environment::GetSingleton()->GetIntValue("RssPreprocessor.Export.numRays", mExportNumRays); 
     42  //Environment::GetSingleton()->GetBoolValue("RssPreprocessor.Export.rays", mExportRays); 
     43  //Environment::GetSingleton()->GetIntValue("RssPreprocessor.Export.numRays", mExportNumRays); 
    4444  Environment::GetSingleton()->GetBoolValue("RssPreprocessor.useViewcells", mUseViewcells); 
    4545  Environment::GetSingleton()->GetBoolValue("RssPreprocessor.objectBasedSampling", mObjectBasedSampling); 
     
    427427  } 
    428428   
    429    
     429  if (!GetThread()) 
     430          cerr << "!!no thread available!" << endl; 
     431 
    430432  cout<<"COMPUTATION THREAD="<<GetThread()->GetCurrentThreadId()<<endl<<flush; 
    431433   
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj

    r1923 r1926  
    7979                                OptimizeForWindowsApplication="TRUE" 
    8080                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\MultiLevelRayTracing" 
    81                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_QT" 
     81                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 
    8282                                RuntimeLibrary="2" 
    8383                                RuntimeTypeInfo="TRUE" 
     
    193193                                OptimizeForProcessor="3" 
    194194                                OptimizeForWindowsApplication="TRUE" 
    195                                 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;" 
    196                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;NO_QT" 
     195                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtGui&quot;" 
     196                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT" 
    197197                                RuntimeLibrary="2" 
    198198                                RuntimeTypeInfo="TRUE" 
     
    252252                                OptimizeForWindowsApplication="TRUE" 
    253253                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;" 
    254                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;NO_QT" 
     254                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL" 
    255255                                RuntimeLibrary="2" 
    256256                                RuntimeTypeInfo="TRUE" 
     
    266266                                OutputFile="../bin/release/Preprocessor.exe" 
    267267                                LinkIncremental="1" 
    268                                 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;;.\QtGlRenderer\Release" 
     268                                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;.\QtGlRenderer\Release" 
     269                                GenerateDebugInformation="FALSE" 
     270                                SubSystem="1" 
     271                                OptimizeReferences="2" 
     272                                EnableCOMDATFolding="2" 
     273                                TargetMachine="1" 
     274                                FixedBaseAddress="1"/> 
     275                        <Tool 
     276                                Name="VCMIDLTool"/> 
     277                        <Tool 
     278                                Name="VCPostBuildEventTool"/> 
     279                        <Tool 
     280                                Name="VCPreBuildEventTool"/> 
     281                        <Tool 
     282                                Name="VCPreLinkEventTool"/> 
     283                        <Tool 
     284                                Name="VCResourceCompilerTool"/> 
     285                        <Tool 
     286                                Name="VCWebServiceProxyGeneratorTool"/> 
     287                        <Tool 
     288                                Name="VCXMLDataGeneratorTool"/> 
     289                        <Tool 
     290                                Name="VCWebDeploymentTool"/> 
     291                        <Tool 
     292                                Name="VCManagedWrapperGeneratorTool"/> 
     293                        <Tool 
     294                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     295                </Configuration> 
     296                <Configuration 
     297                        Name="Release_qt|Win32" 
     298                        OutputDirectory="$(ConfigurationName)" 
     299                        IntermediateDirectory="$(ConfigurationName)" 
     300                        ConfigurationType="1" 
     301                        CharacterSet="2"> 
     302                        <Tool 
     303                                Name="VCCLCompilerTool" 
     304                                Optimization="3" 
     305                                GlobalOptimizations="TRUE" 
     306                                InlineFunctionExpansion="2" 
     307                                EnableIntrinsicFunctions="TRUE" 
     308                                FavorSizeOrSpeed="1" 
     309                                OptimizeForProcessor="0" 
     310                                OptimizeForWindowsApplication="TRUE" 
     311                                AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtGui&quot;;.\QtGlRenderer" 
     312                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_QT" 
     313                                RuntimeLibrary="2" 
     314                                RuntimeTypeInfo="TRUE" 
     315                                UsePrecompiledHeader="0" 
     316                                BrowseInformation="1" 
     317                                WarningLevel="3" 
     318                                Detect64BitPortabilityProblems="TRUE" 
     319                                DebugInformationFormat="3"/> 
     320                        <Tool 
     321                                Name="VCCustomBuildTool"/> 
     322                        <Tool 
     323                                Name="VCLinkerTool" 
     324                                AdditionalDependencies="xerces-c_2.lib glew32.lib zdll.lib zziplib.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib Preprocessor.lib QtCore4.lib qtmain.lib QtOpenGL4.lib Qt3Support4.lib QtTest4.lib QtGui4.lib QtGlRenderer.lib" 
     325                                OutputFile="../bin/release/Preprocessor.exe" 
     326                                LinkIncremental="1" 
     327                                AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;&quot;$(QTDIR)\lib&quot;;.\QtGlRenderer\Release" 
    269328                                GenerateDebugInformation="FALSE" 
    270329                                SubSystem="1" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1903 r1926  
    1 #ifdef GTP_INTERNAL 
    2 #ifndef NO_QT 
     1/*#ifdef GTP_INTERNAL 
     2#ifndef USE_QT 
    33#define USE_QT 1 
    44#else 
     
    66#endif 
    77#endif 
    8  
    9 #define USE_THREADS 1 
     8*/ 
     9 
     10#define USE_THREADS 0 
    1011 
    1112#ifdef UNICODE 
     
    2829#include "SceneGraph.h" 
    2930 
    30  
    31  
    32 #if !USE_QT && USE_THREADS 
    33 #include "BoostPreprocessorThread.h" 
     31#include "ViewCellsManager.h" 
     32 
     33#ifdef USE_QT   
     34        #include "QtPreprocessorThread.h" 
     35        #include "QtGlViewer.h" 
     36        #include "QtGlRenderer.h" 
     37#else 
     38        #if USE_THREADS 
     39                #include "BoostPreprocessorThread.h" 
     40        #endif 
    3441#endif 
    3542 
     
    3744#include "GlRenderer.h" 
    3845 
    39 #ifndef NO_QT 
    40 #include "QtPreprocessorThread.h" 
    41 #include "QtGlRenderer.h" 
    42 #include "QtGlViewer.h" 
    43 #endif 
    4446 
    4547#define USE_EXE_PATH false 
     
    152154} 
    153155 
    154 #include "ViewCellsManager.h" 
     156 
    155157int 
    156158main(int argc, char **argv) 
    157159{ 
    158  
    159160        //Now just call this function at the start of your program and if you're 
    160161        //compiling in debug mode (F5), any leaks will be displayed in the Output 
     
    169170 
    170171        int returnCode = 0; 
    171          
     172 
    172173        InitTiming(); 
    173174 
     
    177178        MeshKdTree::ParseEnvironment(); 
    178179 
    179          
    180180        char buff[128]; 
    181181        Environment::GetSingleton()->GetStringValue("Preprocessor.type", buff); 
     
    189189        } 
    190190 
    191  
    192191        ///////////// 
    193192        //-- load scene  
     
    203202                exit(1); 
    204203        } 
    205  
     204         
    206205        const string externKdTree = ReplaceSuffix(filename, ".obj", ".kdf"); 
    207206        const string internKdTree = GetInternFilename(filename, preprocessor->mLoadMeshes ? ".kdm" : ".kdt"); 
     
    212211        if (preprocessor->InitRayCast(externKdTree, internKdTree)) 
    213212        { 
    214                 cout << "ray casting initialized! here6" << endl; 
     213                cout << "ray casting initialized!" << endl; 
    215214        } 
    216215        else 
     
    221220        } 
    222221 
    223          
    224222        // export objects as obj 
    225223        if (preprocessor->mExportObj) 
     
    248246        } 
    249247         
    250         cout<<"here34"<<endl; 
    251248        // parse view cells related options 
    252249        if (!preprocessor->PrepareViewCells()) 
    253250        { 
     251                cerr << "error: view cells could not be loaded" << endl; 
     252 
    254253                Cleanup(); 
    255254                exit(1); 
    256255        } 
    257256         
    258         if (0)  
    259         { 
    260                 preprocessor->Export(filename + "-out.x3d", true, false); 
    261                 preprocessor->Export(filename + "-kdtree.x3d", false, true);     
    262         } 
    263  
    264257        // create a preprocessor thread (note: capsulates calls to boost fuctions!) 
    265         //PreprocessorThread *pt = PreprocessorThreadFactory::Create(preprocessor); 
    266         PreprocessorThread *pt; 
    267  
    268 #if USE_QT 
     258        PreprocessorThread *pt = NULL; 
     259 
     260#ifdef USE_QT 
     261         
    269262        // create a qt application first (must be created before any opengl widget ...) 
    270263        QApplication *app = new QApplication(argc, NULL); 
    271          
     264 
    272265        pt = new QtPreprocessorThread(preprocessor); 
     266 
    273267#else 
    274 #if USE_THREADS 
    275         pt = new BoostPreprocessorThread(preprocessor); 
    276 #else 
    277         pt = new PreprocessorThread(preprocessor); 
    278 #endif 
    279 #endif 
     268 
     269        //#if USE_THREADS 
     270        //      pt = new BoostPreprocessorThread(preprocessor); 
     271        //#else 
     272                // use a dummy thread 
     273                pt = new DummyPreprocessorThread(preprocessor); 
     274        //#endif 
     275#endif 
     276 
     277        preprocessor->SetThread(pt); 
    280278 
    281279        bool guiSupported = false; 
    282  
     280         
    283281        if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger) 
    284           { 
     282        { 
     283#ifdef USE_QT 
    285284                cout << "using gl widget" << endl; 
    286285                // create and run the preprocessor application in a parallel thread 
    287 #if 0//USE_QT            
    288 #if USE_THREADS 
     286                 
    289287                pt->InitThread(); 
    290                 if (!preprocessor->mDelayVisibilityComputation) 
    291                   pt->RunThread(); 
    292 #endif 
    293                  
     288                pt->RunThread(); 
     289 
    294290                // display the render widget 
    295291                if (!rendererWidget)  
    296292                { 
    297                   if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers()) { 
    298                         QMessageBox::information(0, "OpenGL pbuffers",  
    299                                                                          "This system does not support OpenGL/pbuffers.", 
    300                                                                          QMessageBox::Ok); 
    301                         return NULL; 
    302                   } 
    303                    
    304                   rendererWidget = new QtGlRendererWidget(preprocessor->mSceneGraph, 
    305                                                                                                   preprocessor->mViewCellsManager, 
    306                                                                                                   preprocessor->mKdTree); 
    307                          
    308                   //((QtGlRendererWidget *)rendererWidget)->SetThread((QtPreprocessorThread *)pt); 
    309                   rendererWidget->Show(); 
    310  
    311                   QtGlViewer *viewer = new QtGlViewer(NULL, 
    312                                                                                         (QtGlRendererWidget *) 
    313                                                                                         rendererWidget); 
    314                   viewer->show(); 
    315                   guiSupported = true;  
     293                        if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers()) { 
     294                                QMessageBox::information(0, "OpenGL pbuffers",  
     295                                        "This system does not support OpenGL/pbuffers.", 
     296                                        QMessageBox::Ok); 
     297                                return NULL; 
     298                        } 
     299 
     300                        rendererWidget =  
     301                                new QtGlRendererWidget(preprocessor->mSceneGraph, 
     302                                                                           preprocessor->mViewCellsManager, 
     303                                                                           preprocessor->mKdTree); 
     304 
     305                        rendererWidget->Show(); 
     306 
     307                        QtGlViewer *viewer =  
     308                                new QtGlViewer(NULL, (QtGlRendererWidget *)rendererWidget); 
     309 
     310                        viewer->show(); 
     311                        guiSupported = true;  
    316312                } 
    317313 
    318314                int frames; 
    319315                Environment::GetSingleton()->GetIntValue("Preprocessor.pvsRenderErrorSamples", frames); 
    320                 if (frames) { 
    321                   // NOTE: render texture should be power of 2 and square 
    322                   // renderer must be initialised 
    323                   // $$matt 
    324                   preprocessor->renderer =  
    325                         new QtGlRendererBuffer(512, 512, 
    326                                                                  preprocessor->mSceneGraph, 
    327                                                                  preprocessor->mViewCellsManager, 
    328                                                                  preprocessor->mKdTree); 
    329                   //            preprocessor->Getrenderer->makeCurrent(); 
    330                 } 
     316                 
     317                if (frames)  
     318                { 
     319                        // NOTE: render texture should be power of 2 and square 
     320                        // renderer must be initialised 
     321                        // $$matt 
     322                        preprocessor->renderer =  
     323                                new QtGlRendererBuffer(512, 512, 
     324                                                                           preprocessor->mSceneGraph, 
     325                                                                           preprocessor->mViewCellsManager, 
     326                                                                           preprocessor->mKdTree); 
     327                } 
     328 
    331329                qApp->exec(); 
    332330#endif 
    333           } 
    334  
    335         if (!guiSupported) { 
    336           preprocessor->mUseGlRenderer = false; 
    337           preprocessor->mUseGlDebugger = false; 
    338         } 
    339  
    340         if (!(preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger)) { 
     331        } 
     332 
     333        // no gui available 
     334        if (!guiSupported)  
     335        { 
     336                cout << "warning: gui not supported!" << endl; 
     337                 
     338                preprocessor->mUseGlRenderer = false; 
     339                preprocessor->mUseGlDebugger = false; 
     340        } 
     341 
     342        if (!(preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger))  
     343        { 
     344                cout << "executing main thread" << endl; 
     345 
    341346                // just call the mail method -> will be executed in the main thread 
    342347                pt->Main(); 
     
    345350        // release memory 
    346351        Cleanup(); 
    347          
     352 
    348353        return returnCode; 
    349354} 
Note: See TracChangeset for help on using the changeset viewer.