- Timestamp:
- 01/02/07 01:44:59 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 21 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/GtpVisibility.sln
r1906 r1926 58 58 Release Static = Release Static 59 59 release_noqt = release_noqt 60 Release_qt = Release_qt 60 61 Unicode Debug = Unicode Debug 61 62 Unicode Release = Unicode Release … … 94 95 {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release Static.ActiveCfg = Release|Win32 95 96 {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 98 101 {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Unicode Debug.ActiveCfg = Debug|Win32 99 102 {935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Unicode Debug.Build.0 = Debug|Win32 … … 136 139 {101A7691-74F3-48B4-96A3-CF35578F5900}.Release Static.ActiveCfg = Release|Win32 137 140 {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 140 145 {101A7691-74F3-48B4-96A3-CF35578F5900}.Unicode Debug.ActiveCfg = Debug|Win32 141 146 {101A7691-74F3-48B4-96A3-CF35578F5900}.Unicode Debug.Build.0 = Debug|Win32 … … 178 183 {7319E499-473D-4CE5-9983-725D6E68A55D}.Release Static.ActiveCfg = Release|Win32 179 184 {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 182 189 {7319E499-473D-4CE5-9983-725D6E68A55D}.Unicode Debug.ActiveCfg = Debug|Win32 183 190 {7319E499-473D-4CE5-9983-725D6E68A55D}.Unicode Debug.Build.0 = Debug|Win32 … … 222 229 {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.release_noqt.ActiveCfg = Release_Internal|Win32 223 230 {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 224 233 {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Unicode Debug.ActiveCfg = Debug|Win32 225 234 {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}.Unicode Debug.Build.0 = Debug|Win32 … … 264 273 {EABCE292-D598-4600-A1C9-2591E7D62FDA}.release_noqt.ActiveCfg = release_noqt|Win32 265 274 {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 266 277 {EABCE292-D598-4600-A1C9-2591E7D62FDA}.Unicode Debug.ActiveCfg = Debug|Win32 267 278 {EABCE292-D598-4600-A1C9-2591E7D62FDA}.Unicode Debug.Build.0 = Debug|Win32 … … 306 317 {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.release_noqt.ActiveCfg = release_noqt|Win32 307 318 {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 308 321 {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.Unicode Debug.ActiveCfg = Debug|Win32 309 322 {69BC58F0-C7EB-4B43-B782-B6F047EF0528}.Unicode Debug.Build.0 = Debug|Win32 … … 346 359 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Release Static.ActiveCfg = Release|Win32 347 360 {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 350 365 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Unicode Debug.ActiveCfg = Debug|Win32 351 366 {248F19A6-2FE0-4F5D-8928-E0EA10609887}.Unicode Debug.Build.0 = Debug|Win32 … … 388 403 {17F2C6F9-6101-430E-ABF4-71383868EF24}.Release Static.ActiveCfg = Release|Win32 389 404 {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 392 409 {17F2C6F9-6101-430E-ABF4-71383868EF24}.Unicode Debug.ActiveCfg = Debug|Win32 393 410 {17F2C6F9-6101-430E-ABF4-71383868EF24}.Unicode Debug.Build.0 = Debug|Win32 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj
r1826 r1926 268 268 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 269 269 </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=""$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\Samples\Common\include";..\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=""$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"..\..\GtpVisibility\lib\$(ConfigurationName)";"..\..\lib\$(ConfigurationName)";"..\lib\$(ConfigurationName)";"$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)"" 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) "$(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)""/> 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> 270 321 </Configurations> 271 322 <References> -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
r1826 r1926 347 347 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 348 348 </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=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";..\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=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)";"..\..\..\Preprocessing\lib\$(ConfigurationName)";..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;"..\..\lib\$(ConfigurationName)";"..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)"" 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> 349 419 </Configurations> 350 420 <References> -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj
r1521 r1926 222 222 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 223 223 </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;"$(OGRE_PATH)\OgreMain\include";..\..\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> 224 268 </Configurations> 225 269 <References> -
GTP/trunk/Lib/Vis/Preprocessing/EvalStats/EvalStats.vcproj
r1239 r1926 199 199 <Configuration 200 200 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" 201 247 OutputDirectory="$(ConfigurationName)" 202 248 IntermediateDirectory="$(ConfigurationName)" … … 282 328 <FileConfiguration 283 329 Name="Release Internal|Win32"> 330 <Tool 331 Name="VCCLCompilerTool" 332 UsePrecompiledHeader="1"/> 333 </FileConfiguration> 334 <FileConfiguration 335 Name="Release_qt|Win32"> 284 336 <Tool 285 337 Name="VCCLCompilerTool" -
GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.env
r1746 r1926 15 15 # stored sample rays 16 16 samplesFilename rays.out 17 useGlRenderer false 17 useGlRenderer true 18 #useGlRenderer false 18 19 useGlDebugger false 19 # 0 = INTERNAL 1 = MLRT 20 20 21 # 0 = INTERNAL 1 = MLRT 21 22 rayCastMethod 0 22 23 … … 67 68 pvs false 68 69 rssTree false 69 rays false70 numRays 200071 70 } 72 71 -
GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh
r1746 r1926 2 2 3 3 PREPROCESSOR=../bin/release/preprocessor.exe 4 #PREPROCESSOR=../bin/debug/preprocessor.exe 4 5 5 6 if [ $# -ne 3 ] -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1924 r1926 133 133 mSceneGraph(NULL), 134 134 mRayCaster(NULL), 135 mStopComputation(false) 135 mStopComputation(false), 136 mThread(NULL) 136 137 { 137 138 Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlRenderer", mUseGlRenderer); … … 139 140 // renderer will be constructed when the scene graph and viewcell manager will be known 140 141 renderer = NULL; 141 142 Environment::GetSingleton()->GetBoolValue("Preprocessor.delayVisibilityComputation",143 mDelayVisibilityComputation);144 142 145 143 Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlDebugger", mUseGlDebugger); … … 230 228 filenames.push_back(string(str, pos, str.size() - pos)); 231 229 return (int)filenames.size(); 230 } 231 232 233 void Preprocessor::SetThread(PreprocessorThread *t) 234 { 235 mThread = t; 236 } 237 238 239 PreprocessorThread *Preprocessor::GetThread() const 240 { 241 return mThread; 232 242 } 233 243 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h
r1900 r1926 111 111 */ 112 112 bool LoadSamples(VssRayContainer &samples, 113 113 ObjectContainer &objects) const; 114 114 115 115 /** Exports samples to file. … … 121 121 bool ExportKdTree(const string filename); 122 122 123 124 125 126 127 128 123 virtual bool 124 ExportRays(const char *filename, 125 const VssRayContainer &vssRays, 126 const int number 127 ); 128 129 129 virtual int 130 GenerateRays(const int number,131 132 133 134 135 136 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); 137 137 138 138 bool GenerateRayBundle(SimpleRayContainer &rayBundle, … … 142 142 143 143 virtual void CastRays(SimpleRayContainer &rays, 144 145 146 144 VssRayContainer &vssRays, 145 const bool castDoubleRays, 146 const bool pruneInvalidRays = true); 147 147 148 148 /** Returns a view cells manager of the given name. … … 157 157 158 158 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 160 171 //////////////////////////////////////////////// 161 172 … … 205 216 int mPass; 206 217 207 bool mDelayVisibilityComputation;208 218 bool mStopComputation; 209 219 210 220 bool mExportObj; 211 221 212 213 222 bool mExportRays; 223 int mExportNumRays; 214 224 215 225 ofstream mStats; 216 226 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 226 229 227 230 protected: … … 255 258 bool mUseViewSpaceBox; 256 259 257 260 PreprocessorThread *mThread; 258 261 }; 259 262 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
r1894 r1926 302 302 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 303 303 </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;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include"" 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> 304 357 </Configurations> 305 358 <References> … … 586 639 Outputs=""/> 587 640 </FileConfiguration> 641 <FileConfiguration 642 Name="Release_qt|Win32"> 643 <Tool 644 Name="VCCustomBuildTool" 645 Description="" 646 CommandLine="" 647 Outputs=""/> 648 </FileConfiguration> 588 649 </File> 589 650 <File … … 638 699 Outputs=""/> 639 700 </FileConfiguration> 701 <FileConfiguration 702 Name="Release_qt|Win32"> 703 <Tool 704 Name="VCCustomBuildTool" 705 Description="" 706 CommandLine="" 707 Outputs=""/> 708 </FileConfiguration> 640 709 </File> 641 710 <File … … 734 803 <File 735 804 RelativePath="..\src\Tetrahedron3.h"> 805 </File> 806 <File 807 RelativePath=".\Trackball.cpp"> 808 </File> 809 <File 810 RelativePath=".\Trackball.h"> 736 811 </File> 737 812 <File -
GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp
r1867 r1926 61 61 62 62 63 /*PreprocessorThread *PreprocessorThreadFactory::Create(const int threadType)64 {65 return NULL;66 }*/67 68 63 } -
GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.h
r1867 r1926 15 15 { 16 16 public: 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; 28 18 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; 31 33 32 34 protected: 33 34 35 36 Preprocessor *mPreprocessor; 35 37 }; 36 38 37 /*class PreprocessorThreadFactory 39 40 class DummyPreprocessorThread: public PreprocessorThread 38 41 { 39 PreprocessorThread *Create(const int threadType); 40 }*/ 42 public: 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 }; 41 53 42 54 } -
GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.cpp
r1925 r1926 28 28 const int depthMapSize = 512; 29 29 30 //static vector<OcclusionQuery *> sQueries;31 32 30 QtGlRendererWidget *rendererWidget = NULL; 33 31 QtGlDebuggerWidget *debuggerWidget = NULL; … … 55 53 mViewCellsManager->GetViewPoint(mViewPoint); 56 54 sample.mPosition = mViewPoint; 57 //cout << "viewpoint: " << mViewPoint << endl;58 55 59 56 // take a render cost sample by rendering a cube -
GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.h
r1925 r1926 37 37 { 38 38 Q_OBJECT 39 39 40 public: 40 41 QtGlRendererBuffer(const int w, … … 68 69 const int threshold = 0); 69 70 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 111 108 private: 112 109 113 110 void SetupProjectionForViewPoint(const Vector3 &viewPoint, 114 115 116 117 118 public: 119 111 const Beam &beam, 112 Intersectable *sourceObject); 113 114 115 public: 116 signals: 120 117 void UpdatePvsErrorItem(int i, GlRendererBuffer::PvsErrorEntry &); 121 118 }; … … 124 121 class __declspec(dllexport) QtRendererControlWidget : public QWidget 125 122 { 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 124 public: 125 126 QListWidget *mPvsErrorWidget; 127 128 QtRendererControlWidget(QWidget * parent = 0, Qt::WFlags f = 0); 129 130 public slots: 131 132 void FocusNextPvsErrorFrame(); 133 void UpdatePvsErrorItem(int i, 134 GlRendererBuffer::PvsErrorEntry &); 135 136 signals: 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 160 158 161 159 class __declspec(dllexport) QtGlRendererWidget : public QGLWidget, public GlRendererWidget 162 160 { 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 162 public: 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 231 public 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() {} 300 300 301 301 }; … … 306 306 Q_OBJECT 307 307 public: 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 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; 326 326 327 327 private: 328 GLuint dynamicTexture; 329 int timerId; 328 329 GLuint dynamicTexture; 330 int timerId; 330 331 }; 331 332 -
GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.sln
r1252 r1926 8 8 Debug = Debug 9 9 Release = Release 10 release_internal = release_internal 10 11 EndGlobalSection 11 12 GlobalSection(ProjectConfiguration) = postSolution … … 14 15 {B85DC7B1-58B6-4912-BD64-8B452630A368}.Release.ActiveCfg = Release|Win32 15 16 {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 16 19 EndGlobalSection 17 20 GlobalSection(ExtensibilityGlobals) = postSolution -
GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.vcproj
r1925 r1926 90 90 <Tool 91 91 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=""..\$(ConfigurationName)";"..\..\lib\$(ConfigurationName)";..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;"$(CG_LIB_PATH)";"$(QTDIR)\lib"" 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=""copy dll to preprocessor dir"" 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;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";..\..\..\..\..\..\..\NonGTP\Zlib\include;"$(CG_INC_PATH)"" 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" 94 150 LinkIncremental="1" 95 151 AdditionalLibraryDirectories=""$(QTDIR)\lib";..\..\..\..\..\..\..\NonGTP\Zlib\lib;"$(CG_LIB_PATH)";..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;"..\..\lib\$(ConfigurationName)";..\..\MultiLevelRayTracing\RTScene\Release;..\..\MultiLevelRayTracing\RTWorld\Release" … … 135 191 </File> 136 192 <File 193 RelativePath=".\moc_QtGlViewer.cpp"> 194 </File> 195 <File 137 196 RelativePath=".\QtGlRenderer.cpp"> 138 197 </File> 139 198 <File 140 199 RelativePath=".\QtGlRendererDll.cpp"> 200 </File> 201 <File 202 RelativePath=".\QtGlViewer.cpp"> 141 203 </File> 142 204 </Filter> … … 154 216 CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp 155 217 " 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" 156 238 Outputs="$(InputDir) moc_$(InputName).cpp"/> 157 239 </FileConfiguration> -
GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlViewer.cpp
r1833 r1926 7 7 8 8 // C++ standard headers 9 #include <cmath>9 //#include <cmath> 10 10 11 11 // local headers -
GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlViewer.h
r1833 r1926 3 3 4 4 #include <QtOpenGL> 5 5 #include <QWaitCondition> 6 6 7 7 namespace GtpVisibilityPreprocessor { … … 9 9 class QtGlRendererWidget; 10 10 11 class QtGlViewer : public QGLWidget12 {13 14 Q_OBJECT15 11 16 friend class QtGlRendererWidget; 17 friend class GlRenderer; 12 class __declspec(dllexport) QtGlViewer: public QGLWidget 13 { 14 //Q_OBJECT 18 15 19 16 public: 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 20 28 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 33 30 protected: 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); 39 37 40 38 void keyPressEvent ( QKeyEvent * e ); 41 42 39 40 bool mWireframe; 43 41 44 42 private: 45 43 46 44 float manipulatorLastQuat[4]; 47 float scale; 48 QPoint lastPos; 45 float scale; 46 47 QPoint lastPos; 49 48 49 friend class QtGlRendererWidget; 50 friend class GlRenderer; 50 51 }; 51 52 -
GTP/trunk/Lib/Vis/Preprocessing/src/QtPreprocessorThread.cpp
r1867 r1926 1 #ifdef GTP_INTERNAL2 #ifndef NO_QT 1 #ifdef USE_QT 2 3 3 #include <QApplication> 4 4 #include "QtPreprocessorThread.h" … … 13 13 14 14 QtPreprocessorThread::QtPreprocessorThread(Preprocessor *p, 15 QObject *parent):PreprocessorThread(p), 16 QThread(parent) 17 15 QObject *parent) 16 : PreprocessorThread(p), QThread(parent) 18 17 { 19 18 if (p->mQuitOnFinish) 20 19 { 21 20 connect(this, SIGNAL(finished()), qApp, SLOT(closeAllWindows(void))); 22 21 } 23 22 } … … 26 25 QtPreprocessorThread::~QtPreprocessorThread() 27 26 { 28 cerr <<"Preprocessor thread destructor...\n";27 cerr << "Preprocessor thread destructor...\n"; 29 28 } 29 30 30 31 31 int … … 41 41 } 42 42 43 44 43 #endif 45 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/QtPreprocessorThread.h
r1867 r1926 2 2 #define __QT_PREPROCESSOR_THREAD_H 3 3 4 #ifndef NO_QT 4 #ifdef USE_QT 5 5 6 #include <QThread> 6 7 #include "PreprocessorThread.h" … … 13 14 { 14 15 public: 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(); 24 18 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 } 27 25 28 26 // This function has to be defined by the thread library used... 27 virtual int GetCurrentThreadId() const; 28 29 29 protected: 30 31 Main();32 30 void run() { 31 Main(); 32 } 33 33 }; 34 34 35 35 } 36 36 37 #endif 37 38 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp
r1900 r1926 40 40 Environment::GetSingleton()->GetBoolValue("RssPreprocessor.Export.pvs", mExportPvs); 41 41 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); 44 44 Environment::GetSingleton()->GetBoolValue("RssPreprocessor.useViewcells", mUseViewcells); 45 45 Environment::GetSingleton()->GetBoolValue("RssPreprocessor.objectBasedSampling", mObjectBasedSampling); … … 427 427 } 428 428 429 429 if (!GetThread()) 430 cerr << "!!no thread available!" << endl; 431 430 432 cout<<"COMPUTATION THREAD="<<GetThread()->GetCurrentThreadId()<<endl<<flush; 431 433 -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r1923 r1926 79 79 OptimizeForWindowsApplication="TRUE" 80 80 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" 82 82 RuntimeLibrary="2" 83 83 RuntimeTypeInfo="TRUE" … … 193 193 OptimizeForProcessor="3" 194 194 OptimizeForWindowsApplication="TRUE" 195 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include" "196 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL; NO_QT"195 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include";"$(QTDIR)\include\QtGui"" 196 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT" 197 197 RuntimeLibrary="2" 198 198 RuntimeTypeInfo="TRUE" … … 252 252 OptimizeForWindowsApplication="TRUE" 253 253 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include"" 254 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL ;NO_QT"254 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL" 255 255 RuntimeLibrary="2" 256 256 RuntimeTypeInfo="TRUE" … … 266 266 OutputFile="../bin/release/Preprocessor.exe" 267 267 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;"$(QTDIR)\lib";.\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;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include";"$(QTDIR)\include\QtGui";.\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;"$(QTDIR)\lib";.\QtGlRenderer\Release" 269 328 GenerateDebugInformation="FALSE" 270 329 SubSystem="1" -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r1903 r1926 1 #ifdef GTP_INTERNAL2 #ifndef NO_QT1 /*#ifdef GTP_INTERNAL 2 #ifndef USE_QT 3 3 #define USE_QT 1 4 4 #else … … 6 6 #endif 7 7 #endif 8 9 #define USE_THREADS 1 8 */ 9 10 #define USE_THREADS 0 10 11 11 12 #ifdef UNICODE … … 28 29 #include "SceneGraph.h" 29 30 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 34 41 #endif 35 42 … … 37 44 #include "GlRenderer.h" 38 45 39 #ifndef NO_QT40 #include "QtPreprocessorThread.h"41 #include "QtGlRenderer.h"42 #include "QtGlViewer.h"43 #endif44 46 45 47 #define USE_EXE_PATH false … … 152 154 } 153 155 154 #include "ViewCellsManager.h" 156 155 157 int 156 158 main(int argc, char **argv) 157 159 { 158 159 160 //Now just call this function at the start of your program and if you're 160 161 //compiling in debug mode (F5), any leaks will be displayed in the Output … … 169 170 170 171 int returnCode = 0; 171 172 172 173 InitTiming(); 173 174 … … 177 178 MeshKdTree::ParseEnvironment(); 178 179 179 180 180 char buff[128]; 181 181 Environment::GetSingleton()->GetStringValue("Preprocessor.type", buff); … … 189 189 } 190 190 191 192 191 ///////////// 193 192 //-- load scene … … 203 202 exit(1); 204 203 } 205 204 206 205 const string externKdTree = ReplaceSuffix(filename, ".obj", ".kdf"); 207 206 const string internKdTree = GetInternFilename(filename, preprocessor->mLoadMeshes ? ".kdm" : ".kdt"); … … 212 211 if (preprocessor->InitRayCast(externKdTree, internKdTree)) 213 212 { 214 cout << "ray casting initialized! here6" << endl;213 cout << "ray casting initialized!" << endl; 215 214 } 216 215 else … … 221 220 } 222 221 223 224 222 // export objects as obj 225 223 if (preprocessor->mExportObj) … … 248 246 } 249 247 250 cout<<"here34"<<endl;251 248 // parse view cells related options 252 249 if (!preprocessor->PrepareViewCells()) 253 250 { 251 cerr << "error: view cells could not be loaded" << endl; 252 254 253 Cleanup(); 255 254 exit(1); 256 255 } 257 256 258 if (0)259 {260 preprocessor->Export(filename + "-out.x3d", true, false);261 preprocessor->Export(filename + "-kdtree.x3d", false, true);262 }263 264 257 // 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 269 262 // create a qt application first (must be created before any opengl widget ...) 270 263 QApplication *app = new QApplication(argc, NULL); 271 264 272 265 pt = new QtPreprocessorThread(preprocessor); 266 273 267 #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); 280 278 281 279 bool guiSupported = false; 282 280 283 281 if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger) 284 { 282 { 283 #ifdef USE_QT 285 284 cout << "using gl widget" << endl; 286 285 // create and run the preprocessor application in a parallel thread 287 #if 0//USE_QT 288 #if USE_THREADS 286 289 287 pt->InitThread(); 290 if (!preprocessor->mDelayVisibilityComputation) 291 pt->RunThread(); 292 #endif 293 288 pt->RunThread(); 289 294 290 // display the render widget 295 291 if (!rendererWidget) 296 292 { 297 298 QMessageBox::information(0, "OpenGL pbuffers",299 300 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 310 311 QtGlViewer *viewer = new QtGlViewer(NULL,312 (QtGlRendererWidget *)313 rendererWidget); 314 315 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; 316 312 } 317 313 318 314 int frames; 319 315 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 331 329 qApp->exec(); 332 330 #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 341 346 // just call the mail method -> will be executed in the main thread 342 347 pt->Main(); … … 345 350 // release memory 346 351 Cleanup(); 347 352 348 353 return returnCode; 349 354 }
Note: See TracChangeset
for help on using the changeset viewer.