Changeset 2278 for GTP/trunk/Lib/Vis
- Timestamp:
- 03/22/07 11:48:21 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/GtpVisibility.sln
r2258 r2278 19 19 {101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900} 20 20 {EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA} 21 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}22 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}23 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}24 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}25 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}26 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}27 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}28 {7319E499-473D-4CE5-9983-725D6E68A55D} = {7319E499-473D-4CE5-9983-725D6E68A55D}29 21 EndProjectSection 30 22 EndProject … … 40 32 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCullingTerrain", "..\..\App\Demos\Vis\HillyTerrain\OGRE\TestCullingTerrain.vcproj", "{248F19A6-2FE0-4F5D-8928-E0EA10609887}" 41 33 ProjectSection(ProjectDependencies) = postProject 34 {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} 35 {101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900} 36 EndProjectSection 37 EndProject 38 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestKdTree", "..\..\App\Demos\Vis\KdTreeDemo\OGRE\scripts\TestKdTree.vcproj", "{17F2C6F9-6101-430E-ABF4-71383868EF24}" 39 ProjectSection(ProjectDependencies) = postProject 42 40 {5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638} 43 {101A7691-74F3-48B4-96A3-CF35578F5900} = {101A7691-74F3-48B4-96A3-CF35578F5900}44 {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436}45 EndProjectSection46 EndProject47 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestKdTree", "..\..\App\Demos\Vis\KdTreeDemo\OGRE\scripts\TestKdTree.vcproj", "{17F2C6F9-6101-430E-ABF4-71383868EF24}"48 ProjectSection(ProjectDependencies) = postProject49 41 {5776B40B-5FCE-46D5-8F7C-3912E24E0638} = {5776B40B-5FCE-46D5-8F7C-3912E24E0638} 50 42 {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} = {80DECC17-BDDD-4412-8CF8-F7C1C17A7436} -
GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj
r2254 r2278 72 72 <Tool 73 73 Name="VCCLCompilerTool" 74 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" 75 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE;USE_VERBOSE_PVS" 76 RuntimeLibrary="2" 77 UsePrecompiledHeader="0" 78 WarningLevel="3" 79 Detect64BitPortabilityProblems="TRUE" 80 DebugInformationFormat="3"/> 81 <Tool 82 Name="VCCustomBuildTool"/> 83 <Tool 84 Name="VCLinkerTool" 85 AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib" 86 OutputFile="$(OutDir)/IVReader.dll" 87 LinkIncremental="1" 88 AdditionalLibraryDirectories=""$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"..\..\GtpVisibility\lib\$(ConfigurationName)";"..\..\lib\$(ConfigurationName)";"..\lib\$(ConfigurationName)";"$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)"" 89 GenerateDebugInformation="FALSE" 90 SubSystem="2" 91 OptimizeReferences="2" 92 EnableCOMDATFolding="2" 93 ImportLibrary="$(OutDir)/IVReader.lib" 94 TargetMachine="1"/> 95 <Tool 96 Name="VCMIDLTool"/> 97 <Tool 98 Name="VCPostBuildEventTool"/> 74 Optimization="3" 75 GlobalOptimizations="TRUE" 76 InlineFunctionExpansion="2" 77 EnableIntrinsicFunctions="TRUE" 78 FavorSizeOrSpeed="1" 79 OmitFramePointers="TRUE" 80 EnableFiberSafeOptimizations="TRUE" 81 OptimizeForWindowsApplication="TRUE" 82 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" 83 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE" 84 RuntimeLibrary="2" 85 UsePrecompiledHeader="0" 86 WarningLevel="3" 87 Detect64BitPortabilityProblems="TRUE" 88 DebugInformationFormat="3"/> 89 <Tool 90 Name="VCCustomBuildTool"/> 91 <Tool 92 Name="VCLinkerTool" 93 AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib" 94 OutputFile="$(OutDir)/IVReader.dll" 95 LinkIncremental="1" 96 AdditionalLibraryDirectories=""$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"..\..\GtpVisibility\lib\$(ConfigurationName)";"..\..\lib\$(ConfigurationName)";"..\lib\$(ConfigurationName)";"$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)"" 97 GenerateDebugInformation="TRUE" 98 SubSystem="2" 99 OptimizeReferences="2" 100 EnableCOMDATFolding="2" 101 OptimizeForWindows98="1" 102 ImportLibrary="$(OutDir)/IVReader.lib" 103 TargetMachine="1"/> 104 <Tool 105 Name="VCMIDLTool"/> 106 <Tool 107 Name="VCPostBuildEventTool" 108 CommandLine="copy $(OutDir)\$(TargetFileName) "$(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)""/> 99 109 <Tool 100 110 Name="VCPreBuildEventTool"/> -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h
r2259 r2278 16 16 17 17 /** Sets the number of nodes in this octree 18 @remark do not confuse this with the OctreeNode class which is derived from SceneNode 18 @remark do not confuse this with the OctreeNode class 19 which is derived from SceneNode. 19 20 @param num number of nodes in the octree 20 21 */ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2258 r2278 1928 1928 1929 1929 ivReader.buildTree(this, node); 1930 1931 1930 ivReader.collapse(); 1932 1931 1933 1932 std::stringstream d; 1934 1933 d << "loaded " << filename << " in " << timer->getMilliseconds() * 1e-3 << " secs"; … … 1937 1936 PlatformManager::getSingleton().destroyTimer(timer); 1938 1937 1939 //-- bake into static geometry1940 1938 /*if (USE_STATIC_GEOMETRY) 1941 1939 { 1940 //-- bake into static geometry 1942 1941 BakeSceneIntoStaticGeometry("staticVienna", "Vienna"); 1943 1942 }*/ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
r2259 r2278 58 58 Octree *octree = static_cast<Octree *>(root); 59 59 60 int mask = (int) (rand() * 8 );60 int mask = (int) (rand() * 8.0f); 61 61 62 62 // random decision 63 Octree *child = octree->mChildren[mask & 1][mask & 2][mask & 3]; 63 Octree *child = NULL; 64 65 while (!child) 66 child = octree->mChildren[(mask & 4) / 4][(mask & 2) / 2][mask & 1]; 64 67 65 68 return GetRandomLeaf(child); … … 173 176 { 174 177 octant->setOctreeFullyVisible(octant->isOctreeVisible()); 178 175 179 return; 176 180 } 177 181 178 octant->setOctreeFullyVisible( false);179 182 octant->setOctreeFullyVisible(true); 183 180 184 Octree *nextChild; 181 185 //LogManager::getSingleton().logMessage("***"); 182 186 for (int i = 0; i < 8; ++ i) 183 187 { 184 int x = i &4;185 int y = i &2;188 int x = (i & 4) / 4; 189 int y = (i & 2) / 2; 186 190 int z = i & 1; 191 192 //std::stringstream d; d << "x " << x << " y " << y << " z " << z; 193 //LogManager::getSingleton().logMessage(d.str()); 187 194 188 195 if ((nextChild = octant->mChildren[x][y][z]) != NULL) 189 196 { 190 197 DetermineFullVisibility(nextChild); 198 // this leaf is not fully visible => break 191 199 if (!nextChild->isOctreeFullyVisible()) 192 return;200 octant->setOctreeFullyVisible(false); 193 201 } 194 202 } 195 196 // all children fully visible => pull up197 octant->setOctreeFullyVisible(true);198 203 } 199 204 //----------------------------------------------------------------------- … … 295 300 } 296 301 297 //static_cast<OctreeSceneManager *>(mSceneManager)->getBoxes()->push_back(box);298 302 static_cast<OctreeSceneManager *>(mSceneManager)->getBoxes()->push_back(box); 299 303 } -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformHierarchyInterface.cpp
r2254 r2278 95 95 static RenderOperation ro; 96 96 97 //LogManager::getSingleton().logMessage("here66");98 97 SolidBoundingBox *solidBox = GetSolidBoundingBox(); 99 98 … … 182 181 GtpVisibility::HierarchyNode *node, 183 182 const bool wasVisible) 184 { //LogManager::getSingleton().logMessage("here6960");183 { 185 184 // get next available test id 186 185 GtpVisibility::OcclusionQuery *query = GetNextOcclusionQuery(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneContentGenerator.cpp
r1264 r2278 157 157 return false; 158 158 159 //mSceneNodes.clear(); // reset list of objects 160 161 while (!ifstr.eof()) 159 while (1) 162 160 { 163 161 ifstr.getline(line, 256); 162 163 if (ifstr.eof()) 164 break; 165 164 166 sscanf(line, "%s %f %f %f %f %f %f %f %f %f %f", objName, 165 167 &position.x, &position.y, &position.z, -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreTerrainContentGenerator.cpp
r164 r2278 43 43 return false; 44 44 } 45 45 46 46 47 /*******************************************************/ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
r2255 r2278 26 26 RuntimeLibrary="3" 27 27 EnableFunctionLevelLinking="TRUE" 28 RuntimeTypeInfo=" TRUE"28 RuntimeTypeInfo="FALSE" 29 29 UsePrecompiledHeader="2" 30 30 WarningLevel="3" … … 113 113 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)";"..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\lib\$(ConfigurationName)"" 114 114 ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 115 GenerateDebugInformation=" FALSE"115 GenerateDebugInformation="TRUE" 116 116 SubSystem="2" 117 117 OptimizeReferences="2" -
GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj
r2254 r2278 72 72 <Tool 73 73 Name="VCCLCompilerTool" 74 Optimization="3" 75 GlobalOptimizations="TRUE" 76 InlineFunctionExpansion="2" 77 EnableIntrinsicFunctions="TRUE" 78 FavorSizeOrSpeed="1" 79 OmitFramePointers="TRUE" 80 EnableFiberSafeOptimizations="TRUE" 81 OptimizeForWindowsApplication="TRUE" 74 82 AdditionalIncludeDirectories=""$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\Samples\Common\include";..\include;..\..\..\Preprocessing\src" 75 83 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OBJREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE" … … 96 104 Name="VCMIDLTool"/> 97 105 <Tool 98 Name="VCPostBuildEventTool"/> 106 Name="VCPostBuildEventTool" 107 CommandLine="copy $(OutDir)\$(TargetFileName) "$(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)""/> 99 108 <Tool 100 109 Name="VCPreBuildEventTool"/> -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingManager.h
r897 r2278 4 4 #include "HierarchyInterface.h" 5 5 6 6 7 namespace GtpVisibility { 7 8 8 9 /** This abstract class implements an interface for a specific culling 9 algorithm. The algorithm is either used to render a scene or to make a visibility query. 10 algorithm. The algorithm is either used to render a scene 11 or to make a visibility query. 10 12 */ 11 13 class CullingManager -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyPreprocessingManager.h
r316 r2278 1 1 #ifndef _VisibilityDummyPreprocessingManager_H__ 2 2 #define _VisibilityDummyPreprocessingManager_H__ 3 3 4 4 5 #include "PreprocessingManager.h" … … 18 19 hierarchyInterface as argument. 19 20 */ 20 DummyPreprocessingManager( HierarchyInterface *hierarchyInterface);21 DummyPreprocessingManager(HierarchyInterface *hierarchyInterface); 21 22 22 23 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityEnvironment.h
r1004 r2278 18 18 VisibilityEnvironment(); 19 19 ~VisibilityEnvironment(); 20 20 21 /** Different types of occlusion culling algorithms 21 22 */ … … 36 37 std::string getViewCellsFileName(); 37 38 38 GtpVisibilityPreprocessor::Environment *GetPreprocessorEnvironment(); 39 //GtpVisibilityPreprocessor::Environment *GetPreprocessorEnvironment(); 40 }; 39 41 40 41 protected:42 //GtpVisibilityPreprocessor::Environment *Environment::GetSingleton();43 };44 42 } // namespace GtpVisibility 45 43 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityManager.h
r925 r2278 4 4 #include "CullingManager.h" 5 5 #include "VisibilityEnvironment.h" 6 6 7 7 8 /** This namespace includes all classes which are created by the VUT (Vienna University -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj
r2258 r2278 71 71 OptimizeForProcessor="3" 72 72 OptimizeForWindowsApplication="TRUE" 73 AdditionalIncludeDirectories="..\include;"$(OGRE_PATH)\OgreMain\include" ;..\..\Preprocessing\src"74 PreprocessorDefinitions="WIN32;NDEBUG;_LIB "73 AdditionalIncludeDirectories="..\include;"$(OGRE_PATH)\OgreMain\include"" 74 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE" 75 75 StringPooling="TRUE" 76 76 RuntimeLibrary="2" -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
r2259 r2278 106 106 continue; 107 107 } 108 108 if (mHierarchyInterface->IsLeaf(node)) 109 { 110 if (mHierarchyInterface->IsNodeVisible(node)) 111 Ogre::LogManager::getSingleton().logMessage("u"); 112 else 113 Ogre::LogManager::getSingleton().logMessage("g"); 114 } 115 109 116 if (mHierarchyInterface->IsNodeFullyVisible(node)) 110 { 117 {Ogre::LogManager::getSingleton().logMessage("here8"); 111 118 // node fully visible => test only random leaves 112 119 for (int i = 0; i < mRandomCandidates; ++ i) 113 120 { 121 Ogre::LogManager::getSingleton().logMessage("z"); 114 122 HierarchyNode *randomLeaf = mHierarchyInterface->GetRandomLeaf(node); 115 123 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp
r2183 r2278 1 1 #include "VisibilityEnvironment.h" 2 #include "common.h"3 #include "Environment.h"2 //#include "common.h" 3 //#include "Environment.h" 4 4 5 5 … … 10 10 { 11 11 // HACK: loading debug stream should not happen here 12 GtpVisibilityPreprocessor::Debug.open("debug.log"); 13 // load environment 14 //Environment::GetSingleton() = new GtpVisibilityPreprocessor::Environment::GetSingleton(); 12 //GtpVisibilityPreprocessor::Debug.open("debug.log"); 15 13 } 16 14 //----------------------------------------------------------------------- 17 15 VisibilityEnvironment::~VisibilityEnvironment() 18 16 { 19 GtpVisibilityPreprocessor::Environment::DelSingleton();17 //GtpVisibilityPreprocessor::Environment::DelSingleton(); 20 18 } 21 19 //----------------------------------------------------------------------- … … 23 21 { 24 22 //-- parse environment 25 return GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str());23 return false;//GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str()); 26 24 } 27 25 //----------------------------------------------------------------------- … … 29 27 { 30 28 char str[200]; 31 GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("Scene.filename", str);29 //GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("Scene.filename", str); 32 30 return str; 33 31 } … … 36 34 { 37 35 char str[200]; 38 GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("ViewCells.filename", str);36 //GtpVisibilityPreprocessor::Environment::GetSingleton()->GetStringValue("ViewCells.filename", str); 39 37 40 38 return str; 41 39 } 42 40 //----------------------------------------------------------------------- 43 GtpVisibilityPreprocessor::Environment *VisibilityEnvironment::GetPreprocessorEnvironment()41 /*GtpVisibilityPreprocessor::Environment *VisibilityEnvironment::GetPreprocessorEnvironment() 44 42 { 45 43 return GtpVisibilityPreprocessor::Environment::GetSingleton(); 46 } 44 }*/ 45 47 46 } // namespace GtpVisibility -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp
r2066 r2278 5 5 #include "DummyPreprocessingManager.h" 6 6 #include "DummyQueryManager.h" 7 //#include "BatchedQueriesCullingManager.h"7 #include "RandomUpdateCullingManager.h" 8 8 9 9 namespace GtpVisibility { … … 53 53 case VisibilityEnvironment::STOP_AND_WAIT_CULLING: 54 54 mCullingManager = new StopAndWaitCullingManager(); 55 //new BatchedQueriesCullingManager();56 55 break; 57 56 … … 61 60 62 61 case VisibilityEnvironment::FRUSTUM_CULLING: 63 mCullingManager = new FrustumCullingManager(); 62 //mCullingManager = new FrustumCullingManager(); 63 mCullingManager = new RandomUpdateCullingManager(); 64 64 break; 65 65
Note: See TracChangeset
for help on using the changeset viewer.