Changeset 1003


Ignore:
Timestamp:
06/07/06 13:56:08 (18 years ago)
Author:
mattausch
Message:

added collada importer

Location:
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj

    r999 r1003  
    7373                        <Tool 
    7474                                Name="VCCLCompilerTool" 
    75                                 AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;..\..\Ogre\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\include;..\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;&quot;$(LIBXML_HOME)\include&quot;" 
     75                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;..\..\Ogre\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\include;..\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;&quot;$(LIBXML_HOME)\include&quot;;d:\work\Collada\include" 
    7676                                PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE" 
    7777                                RuntimeLibrary="2" 
     
    8585                        <Tool 
    8686                                Name="VCLinkerTool" 
    87                                 AdditionalDependencies="OGREMain.LIB CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib Plugin_VisibilitySceneManager.lib IVReader.lib zdll.lib zziplib.lib" 
     87                                AdditionalDependencies="OGREMain.LIB CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib Plugin_VisibilitySceneManager.lib IVReader.lib zdll.lib zziplib.lib Plugin_Collada.lib" 
    8888                                OutputFile="$(OGRE_PATH)/Samples/Common/bin/Release/TestCullingTerrain.exe" 
    8989                                LinkIncremental="1" 
    90                                 AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\Ogre\lib\$(ConfigurationName)&quot;;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;" 
     90                                AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\Ogre\lib\$(ConfigurationName)&quot;;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;;d:\work\Collada\bin\release" 
    9191                                GenerateDebugInformation="TRUE" 
    9292                                SubSystem="2" 
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp

    r999 r1003  
    329329} 
    330330//----------------------------------------------------------------------- 
    331 bool TestCullingTerrainApplication::LoadSceneIV(const String &filename,  
    332                                                                                                 SceneNode *root,  
    333                                                                                                 const int index) 
     331bool TestCullingTerrainApplication::LoadSceneCollada(const String &filename,  
     332                                                                                                         SceneNode *root,  
     333                                                                                                         const int index) 
    334334{ 
    335335        // Collada 
    336 #if 1 
    337336        ColladaDocument *daeDoc = new ColladaDocument(mSceneMgr); 
    338337 
    339         String daeName = strCmdLine; 
    340         if (daeName.empty())  
    341                 daeName = "cube.dae"; 
     338        String daeName = filename; 
     339        //if (daeName.empty())  
     340        //      daeName = "City_1500.dae"; 
    342341 
    343342        // default directory 
    344         daeName.insert(0, "../../media/models/collada/"); 
     343        //daeName.insert(0, "../../media/models/collada/City"); 
    345344        LogManager::getSingleton().logMessage("ColladaDocument - import started"); 
    346          
     345 
    347346        // full import 
    348347        if (daeDoc->doImport(daeName)) 
     
    358357                 */ 
    359358                daeDoc->getScene()->createOgreInstance(NULL); 
    360         } 
    361  
    362         LogManager::getSingleton().logMessage("ColladaDocument - import finished"); 
    363         // everything is loaded, we do not need the collada document anymore 
    364         delete daeDoc; 
    365 #else 
     359 
     360                // everything is loaded, we do not need the collada document anymore 
     361                delete daeDoc; 
     362 
     363                return true; 
     364        } 
     365        else 
     366        { 
     367                LogManager::getSingleton().logMessage("ColladaDocument - import failed"); 
     368                return false; 
     369        } 
     370 
     371        return true; 
     372} 
     373//----------------------------------------------------------------------- 
     374bool TestCullingTerrainApplication::LoadSceneIV(const String &filename,  
     375                                                                                                SceneNode *root,  
     376                                                                                                const int index) 
     377{ 
     378 
    366379 
    367380 
     
    404417                return true; 
    405418        } 
    406 #endif 
    407419 
    408420        return false; 
     
    756768                        LoadSceneIV(fn, mSceneMgr->getRootSceneNode(), i);                       
    757769                } 
    758                 else if (strstr(filename.c_str(), ".collada")) 
     770                else if (strstr(filename.c_str(), ".dae")) 
    759771                { 
    760772                        // load collada files 
    761                 } 
    762                 else if (filename == "terrain") 
     773                        // load iv files 
     774                        LoadSceneCollada(fn, mSceneMgr->getRootSceneNode(), i);          
     775                } 
     776                else //if (filename == "terrain") 
    763777                { 
    764778                        // terrain hack 
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.h

    r973 r1003  
    128128        bool LoadSceneIV(const String &filename, SceneNode *root, const int index); 
    129129 
     130        bool LoadSceneCollada(const String &filename, SceneNode *root, const int index); 
     131 
    130132        bool LoadScene(const String &filename); 
    131133 
Note: See TracChangeset for help on using the changeset viewer.