Changeset 657 for GTP/trunk/Lib/Vis


Ignore:
Timestamp:
02/20/06 19:06:03 (18 years ago)
Author:
mattausch
Message:

added ogre dependencies and patched ogre sources

Location:
GTP/trunk/Lib/Vis
Files:
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj

    r643 r657  
    2020                                Name="VCCLCompilerTool" 
    2121                                Optimization="0" 
    22                                 AdditionalIncludeDirectories=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\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;..\..\GtpVisibility\include" 
     22                                AdditionalIncludeDirectories=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\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;..\..\GtpVisibility\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\include" 
    2323                                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 
    2424                                MinimalRebuild="TRUE" 
     
    3636                                Name="VCLinkerTool" 
    3737                                IgnoreImportLibrary="TRUE" 
    38                                 AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib Plugin_OctreeSceneManager.lib Plugin_DotSceneManager.lib GtpVisibility.lib" 
     38                                AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib" 
    3939                                OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll" 
    4040                                Version="0.99" 
    41                                 LinkIncremental="2" 
     41                                LinkIncremental="1" 
    4242                                SuppressStartupBanner="TRUE" 
    4343                                AdditionalLibraryDirectories=""$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";"$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)";"..\lib\$(ConfigurationName)";"..\..\lib\$(ConfigurationName)";"..\..\GtpVisibility\lib\$(ConfigurationName)"" 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp

    r133 r657  
    7474extern "C" void __declspec(dllexport) dllStopPlugin() 
    7575{ 
    76         delete heightmapTerrainPageSource; 
     76        //delete heightmapTerrainPageSource; 
    7777 
    78         delete visibilityOctreePlugin; 
    79         delete visibilityTerrainPlugin; 
     78        // (HACK: crashes on delete!!!! FIX this  
     79        //delete visibilityOctreePlugin; 
     80        //delete visibilityTerrainPlugin; 
    8081        //delete occlusionDotPlugin; 
    8182         
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/GtpVisibility.vcproj

    r373 r657  
    2121                                Optimization="0" 
    2222                                AdditionalIncludeDirectories=""$(OGRE_PATH)\OgreMain\include";..\include" 
    23                                 PreprocessorDefinitions="WIN32;_DEBUG;_LIB" 
     23                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE" 
    2424                                MinimalRebuild="TRUE" 
    2525                                BasicRuntimeChecks="3" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.cpp

    r508 r657  
    6161//  StdInParseHandlers: Constructors and Destructor 
    6262// --------------------------------------------------------------------------- 
    63 X3dParseHandlers::X3dParseHandlers(SceneGraphNode *root) : 
     63X3dParseHandlers::X3dParseHandlers(SceneGraphNode *root, const bool loadPolygonsAsMeshes): 
    6464  mElementCount(0) 
    6565  , mAttrCount(0) 
    6666  , mCharacterCount(0) 
    6767  , mSpaceCount(0) 
    68  // , mCurrentObjectId(0) 
     68  , mLoadPolygonsAsMeshes(loadPolygonsAsMeshes) 
    6969{ 
    7070  mCurrentNode = root; 
     
    124124        if (ptr == endptr || index == -1) { 
    125125          if (vertices.size() > 2) { 
    126             Face *face = new Face(vertices); 
    127             mCurrentMesh->mFaces.push_back(face); 
     126                  Face *face = new Face(vertices); 
     127 
     128                   mCurrentMesh->mFaces.push_back(face); 
     129 
     130                   // every polygon is a mesh => store in mesh instance and create new mesh 
     131                  if (mLoadPolygonsAsMeshes) 
     132                  { 
     133                          mCurrentMesh->Preprocess(); 
     134 
     135                          // make an instance of this mesh 
     136                          MeshInstance *mi = new MeshInstance(mCurrentMesh); 
     137                          mCurrentNode->mGeometry.push_back(mi); 
     138 
     139                          mCurrentMesh = new Mesh(); 
     140                  } 
     141 
    128142          } 
    129143          vertices.clear(); 
     
    163177                                  AttributeList&  attributes) 
    164178{ 
    165   int len = attributes.getLength(); 
    166   int i; 
    167   VertexContainer vertices; 
    168   for (i=0; i < len; i++) { 
    169     string attrName(StrX(attributes.getName(i)).LocalForm()); 
    170     if (attrName == "point") { 
    171       StrX attrValue(attributes.getValue(i)); 
    172       const char *ptr = attrValue.LocalForm(); 
    173       char *endptr; 
    174       while(1) { 
    175         float x = (float)strtod(ptr, &endptr); 
    176         if (ptr == endptr) 
    177           break; 
    178         ptr = endptr; 
    179         float y = (float)strtod(ptr, &endptr); 
    180         if (ptr == endptr) 
    181           break; 
    182         ptr = endptr; 
    183         float z = (float)strtod(ptr, &endptr); 
    184         if (ptr == endptr) 
    185           break; 
    186         ptr = endptr; 
    187         if (*ptr == ',') 
    188           ptr++; 
    189         Vector3 v(x, y, z); 
    190         vertices.push_back(v); 
    191       } 
    192       mCurrentMesh->mVertices = vertices; 
    193     } 
    194   } 
     179        int len = attributes.getLength(); 
     180         
     181        int i; 
     182        VertexContainer vertices; 
     183         
     184        for (i=0; i < len; i++)  
     185        { 
     186                string attrName(StrX(attributes.getName(i)).LocalForm()); 
     187           
     188                if (attrName == "point")  
     189                { 
     190                        StrX attrValue(attributes.getValue(i)); 
     191                   
     192 
     193                        const char *ptr = attrValue.LocalForm(); 
     194                        char *endptr; 
     195 
     196 
     197                        while(1)  
     198                        { 
     199                                float x = (float)strtod(ptr, &endptr); 
     200                 
     201                                if (ptr == endptr) 
     202                                  break; 
     203                           
     204                                ptr = endptr; 
     205                                 
     206                                float y = (float)strtod(ptr, &endptr); 
     207                           
     208                                if (ptr == endptr) 
     209                                        break; 
     210 
     211                                ptr = endptr; 
     212                           
     213                                float z = (float)strtod(ptr, &endptr); 
     214                                if (ptr == endptr) 
     215                                        break; 
     216                           
     217                                ptr = endptr; 
     218                           
     219                                if (*ptr == ',') 
     220                                        ptr ++; 
     221 
     222                                Vector3 v(x, y, z); 
     223                                vertices.push_back(v); 
     224                        } 
     225                        mCurrentMesh->mVertices = vertices; 
     226                } 
     227        } 
    195228} 
    196229 
     
    284317bool 
    285318X3dParser::ParseFile(const string filename, 
    286                      SceneGraphNode **root) 
     319                                         SceneGraphNode **root, 
     320                                         const bool loadPolygonsAsMeshes) 
    287321{ 
    288322  // Initialize the XML4C system 
     
    317351  // 
    318352  *root = new SceneGraphNode; 
    319   X3dParseHandlers handler(*root); 
     353  X3dParseHandlers handler(*root, loadPolygonsAsMeshes); 
    320354  parser->setDocumentHandler(&handler); 
    321355  parser->setErrorHandler(&handler); 
     
    389423// --------------------------------------------------------------------------- 
    390424X3dViewCellsParseHandlers::X3dViewCellsParseHandlers(ViewCellsManager *viewCellsManager,  
    391                                                                                                          float viewCellHeight): 
     425                                                                                                         const float viewCellHeight): 
    392426mElementCount(0),  
    393427mAttrCount(0),  
  • GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.h

    r490 r657  
    1212  X3dParser():Parser(), mViewCellHeight(5.0f) {} 
    1313   
    14   bool ParseFile(const string filename, SceneGraphNode **root); 
     14  bool ParseFile(const string filename, SceneGraphNode **root, const bool loadPolygonsAsMeshes = false); 
    1515  bool ParseFile(const string filename, ViewCellsManager &viewCells); 
    1616   
  • GTP/trunk/Lib/Vis/Preprocessing/src/X3dParserXerces.h

    r490 r657  
    2424  //  Constructors and Destructor 
    2525  // ----------------------------------------------------------------------- 
    26   X3dParseHandlers(SceneGraphNode *root); 
     26  X3dParseHandlers(SceneGraphNode *root, const bool loadPolygonsAsMeshes = false); 
    2727  ~X3dParseHandlers(); 
    2828   
     
    6464  Mesh *mCurrentMesh; 
    6565  Material *mCurrentMaterial; 
    66   //int mCurrentObjectId; 
     66  bool mLoadPolygonsAsMeshes; 
    6767 
    6868  // Handlers for X3D 
     
    117117  // ----------------------------------------------------------------------- 
    118118  X3dViewCellsParseHandlers(ViewCellsManager *viewCellsManager,  
    119                                                         float viewCellHeight); 
     119                                                        const float viewCellHeight); 
    120120  ~X3dViewCellsParseHandlers(); 
    121121   
     
    156156  ViewCellsManager *mViewCellsManager; 
    157157  float mViewCellHeight; 
     158  
    158159 
    159160  VertexIndexContainer mCurrentVertexIndices; 
  • GTP/trunk/Lib/Vis/README_ONLINE.txt

    r643 r657  
    441) Requirements:  
    55   WindowsXP 
    6    Ogre 1.03 for vs 7.1 
    7    Ogre Dependencies 
    86   svn 
    97 
     
    119   in the following it is assumed that your repository is located in e:\svn\gametools (not required, just replace your path) 
    1210 
    13    deprecated: the current stable version is located in D:\gametools\branches\0.3 
    1411 
    15 2) add following environment variables: 
    16    OGRE_PATH: directory where ogre.sln is located 
     123) add following environment variables: 
     13   OGRE_PATH: directory where ogre.sln is located (in directory OGRE) 
    1714 
    18 3) copy e:\svn\gametools\OGRE\trunk\ogre_changes into OGRE_PATH directory (only applies to version 1.03!!!!) 
     154) Set preprocessor flag GTP_VISIBILITY_MODIFIED_OGRE to the example projects you want to use 
    1916 
    20 4) Set configuration of Ogre soluation to release. add preprocessor flag GTP_VISIBILITY_MODIFIED_OGRE to following projects: 
    21    Plugin_OctreeSceneManager 
    22    RenderSystem_GL 
    23    RenderSystem_Direct9 
    24    RenderSystem_Direct7 
    25    OgreMain 
    26    GuiRenderer 
    27     
    28    Also add the flag to the example projects you want to use 
     175) open scripts GTP\trunk\Lib\Vis\shared\GtpVisibility.sln and compile all 
    2918 
    30 5) Add following resources to OGRE_PATH\Samples\Common\bin\Release\resource.cfg: 
    31  
    32    FileSystem=e:\svn\gametools\OGRE\trunk\resources\materials\scripts 
    33    FileSystem=e:\svn\gametools\OGRE\trunk\resources\materials\textures 
    34    FileSystem=e:\svn\gametools\OGRE\trunk\resources\models 
    35    FileSystem=e:\svn\gametools\OGRE\trunk\resources\models\trees 
    36    FileSystem=e:\svn\gametools\OGRE\trunk\resources\overlays 
    37    FileSystem=e:\svn\gametools\OGRE\trunk\resources\media 
    38  
    39 6) Add Plugin_VisibilitySceneManager to OGRE_PATH\Samples\Common\bin\Release\Plugins.cfg 
    40    and comment out OctreeSceneManager 
    41  
    42 7) Copy D:\gametools\trunk\VUT\Ogre\resources\terrain.cfg into OGRE_PATH\Samples\Common\bin\Release 
    43  
    44 8) open scripts\GtpVisibility.sln and compile all 
    45  
    46 9) start TerrainExampleApplication for testing 
     196) start TerrainExampleApplication for testing 
Note: See TracChangeset for help on using the changeset viewer.