Changeset 2119 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Timestamp:
- 02/15/07 14:45:30 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
r1823 r2119 142 142 void VisualizeViewCells(const bool visualize); 143 143 144 /** Load an iv scene. 145 */ 144 146 bool LoadSceneIV(const String &filename, 145 147 SceneNode *root, 146 148 const int index); 147 149 148 bool LoadScene(const String &filename); 150 /** Load obj scene. 151 */ 152 bool LoadSceneObj(const String &filename, 153 const String &viewCellsFile, 154 SceneNode *root); 155 156 /** Load a scene. 157 */ 158 bool LoadScene(const String &filename, const String &viewCellsFilename); 149 159 150 160 void loadConfig(DataStreamPtr& stream); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2115 r2119 23 23 #include "IntersectableWrapper.h" 24 24 #include "IVReader.h" 25 #include "ObjReader.h" 26 25 27 26 28 … … 154 156 155 157 // load the scene 156 LoadScene(mFilename );157 158 // load view cells 159 //mViewCellsLoaded = LoadViewCells(mViewCellsFilename);158 LoadScene(mFilename, mViewCellsFilename); 159 160 // load view cells: load later ... 161 if (0) mViewCellsLoaded = LoadViewCells(mViewCellsFilename); 160 162 161 163 if (mShowTerrain) … … 1592 1594 } 1593 1595 //----------------------------------------------------------------------- 1594 bool OcclusionCullingSceneManager::LoadScene(const String &filename) 1596 bool OcclusionCullingSceneManager::LoadScene(const String &filename, 1597 const String &viewCellsFilename) 1595 1598 { 1596 1599 using namespace std; … … 1620 1623 const string fn = *fit; 1621 1624 1622 if (strstr(fn.c_str(), ".iv") || strstr(fn.c_str(), ".wrl")) 1625 if (strstr(fn.c_str(), ".obj")) 1626 { 1627 // load iv files 1628 if (!LoadSceneObj(filename, viewCellsFilename, getRootSceneNode())) 1629 { 1630 LogManager::getSingleton().logMessage("error loading file"); 1631 return false; 1632 } 1633 } 1634 else if (strstr(fn.c_str(), ".iv") || strstr(fn.c_str(), ".wrl")) 1623 1635 { 1624 1636 // load iv files … … 1682 1694 } 1683 1695 //----------------------------------------------------------------------- 1696 bool OcclusionCullingSceneManager::LoadSceneObj(const String &filename, 1697 const String &viewCellsFile, 1698 SceneNode *root) 1699 { 1700 ObjReader objReader(this); 1701 1702 Timer *timer = PlatformManager::getSingleton().createTimer(); 1703 timer->reset(); 1704 1705 if (!objReader.LoadFile(filename.c_str(), viewCellsFile, root)) 1706 { 1707 PlatformManager::getSingleton().destroyTimer(timer); 1708 return false; 1709 } 1710 1711 SceneNode *node = root->createChildSceneNode("ObjSceneNode"); 1712 1713 std::stringstream d; 1714 d << "loaded " << filename << " in " << timer->getMilliseconds() * 1e-3 << " secs"; 1715 LogManager::getSingleton().logMessage(d.str()); 1716 1717 PlatformManager::getSingleton().destroyTimer(timer); 1718 1719 return true; 1720 } 1721 //----------------------------------------------------------------------- 1684 1722 const String OcclusionCullingSceneManagerFactory::FACTORY_TYPE_NAME = "OcclusionCullingSceneManager"; 1685 1723 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
r2111 r2119 89 89 OptimizeForProcessor="3" 90 90 OptimizeForWindowsApplication="TRUE" 91 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;..\..\..\Preprocessing\src\Timer "92 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE "91 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;..\..\..\Preprocessing\src\Timer;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\include" 92 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1" 93 93 StringPooling="TRUE" 94 94 RuntimeLibrary="2" … … 105 105 Name="VCLinkerTool" 106 106 IgnoreImportLibrary="TRUE" 107 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 "107 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 ObjReader.lib" 108 108 OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll" 109 109 Version="0.99" 110 110 LinkIncremental="1" 111 111 SuppressStartupBanner="TRUE" 112 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)" "112 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)"" 113 113 ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 114 114 GenerateDebugInformation="FALSE"
Note: See TracChangeset
for help on using the changeset viewer.