- Timestamp:
- 02/20/06 19:06:03 (19 years ago)
- Location:
- GTP/trunk
- Files:
-
- 10 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj
r643 r657 21 21 Name="VCCLCompilerTool" 22 22 Optimization="0" 23 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\GtpVisibility\include;..\..\Ogre\include;..\include "23 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\GtpVisibility\include;..\..\Ogre\include;..\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\include" 24 24 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_DEBUG;WIN32;_STLP_DEBUG;PLUGIN_TERRAIN_IMPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 25 25 MinimalRebuild="TRUE" … … 35 35 <Tool 36 36 Name="VCLinkerTool" 37 AdditionalDependencies="Plugin_OctreeSceneManager.lib Plugin_VisibilitySceneManager.lib OGREMain_d.LIB CEGUIBase_d.lib OgreGUIRenderer_d.lib Plugin_DotSceneManager.lib"37 AdditionalDependencies="Plugin_OctreeSceneManager.lib Plugin_VisibilitySceneManager.lib OGREMain_d.LIB CEGUIBase_d.lib OgreGUIRenderer_d.lib" 38 38 OutputFile="$(OGRE_PATH)/Samples/Common/bin/Debug/TestCullingTerrain.exe" 39 39 LinkIncremental="1" 40 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"..\..\Ogre\lib\$(ConfigurationName)" "40 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"..\..\Ogre\lib\$(ConfigurationName)";"..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\$(ConfigurationName)";..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib" 41 41 GenerateDebugInformation="TRUE" 42 42 ProgramDatabaseFile="$(OutDir)/TestCullingTerrain.pdb" -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
r648 r657 160 160 OGRE_DELETE(mRayQueryExecutor); 161 161 162 deleteEntityStates(); 162 deleteEntityStates(); 163 163 } 164 164 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj
r643 r657 20 20 Name="VCCLCompilerTool" 21 21 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" 23 23 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 24 24 MinimalRebuild="TRUE" … … 36 36 Name="VCLinkerTool" 37 37 IgnoreImportLibrary="TRUE" 38 AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib Plugin_OctreeSceneManager.lib Plugin_DotSceneManager.libGtpVisibility.lib"38 AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib" 39 39 OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll" 40 40 Version="0.99" 41 LinkIncremental=" 2"41 LinkIncremental="1" 42 42 SuppressStartupBanner="TRUE" 43 43 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 74 74 extern "C" void __declspec(dllexport) dllStopPlugin() 75 75 { 76 delete heightmapTerrainPageSource;76 //delete heightmapTerrainPageSource; 77 77 78 delete visibilityOctreePlugin; 79 delete visibilityTerrainPlugin; 78 // (HACK: crashes on delete!!!! FIX this 79 //delete visibilityOctreePlugin; 80 //delete visibilityTerrainPlugin; 80 81 //delete occlusionDotPlugin; 81 82 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/GtpVisibility.vcproj
r373 r657 21 21 Optimization="0" 22 22 AdditionalIncludeDirectories=""$(OGRE_PATH)\OgreMain\include";..\include" 23 PreprocessorDefinitions="WIN32;_DEBUG;_LIB "23 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE" 24 24 MinimalRebuild="TRUE" 25 25 BasicRuntimeChecks="3" -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.cpp
r508 r657 61 61 // StdInParseHandlers: Constructors and Destructor 62 62 // --------------------------------------------------------------------------- 63 X3dParseHandlers::X3dParseHandlers(SceneGraphNode *root ):63 X3dParseHandlers::X3dParseHandlers(SceneGraphNode *root, const bool loadPolygonsAsMeshes): 64 64 mElementCount(0) 65 65 , mAttrCount(0) 66 66 , mCharacterCount(0) 67 67 , mSpaceCount(0) 68 // , mCurrentObjectId(0)68 , mLoadPolygonsAsMeshes(loadPolygonsAsMeshes) 69 69 { 70 70 mCurrentNode = root; … … 124 124 if (ptr == endptr || index == -1) { 125 125 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 128 142 } 129 143 vertices.clear(); … … 163 177 AttributeList& attributes) 164 178 { 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 } 195 228 } 196 229 … … 284 317 bool 285 318 X3dParser::ParseFile(const string filename, 286 SceneGraphNode **root) 319 SceneGraphNode **root, 320 const bool loadPolygonsAsMeshes) 287 321 { 288 322 // Initialize the XML4C system … … 317 351 // 318 352 *root = new SceneGraphNode; 319 X3dParseHandlers handler(*root );353 X3dParseHandlers handler(*root, loadPolygonsAsMeshes); 320 354 parser->setDocumentHandler(&handler); 321 355 parser->setErrorHandler(&handler); … … 389 423 // --------------------------------------------------------------------------- 390 424 X3dViewCellsParseHandlers::X3dViewCellsParseHandlers(ViewCellsManager *viewCellsManager, 391 float viewCellHeight):425 const float viewCellHeight): 392 426 mElementCount(0), 393 427 mAttrCount(0), -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.h
r490 r657 12 12 X3dParser():Parser(), mViewCellHeight(5.0f) {} 13 13 14 bool ParseFile(const string filename, SceneGraphNode **root );14 bool ParseFile(const string filename, SceneGraphNode **root, const bool loadPolygonsAsMeshes = false); 15 15 bool ParseFile(const string filename, ViewCellsManager &viewCells); 16 16 -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dParserXerces.h
r490 r657 24 24 // Constructors and Destructor 25 25 // ----------------------------------------------------------------------- 26 X3dParseHandlers(SceneGraphNode *root );26 X3dParseHandlers(SceneGraphNode *root, const bool loadPolygonsAsMeshes = false); 27 27 ~X3dParseHandlers(); 28 28 … … 64 64 Mesh *mCurrentMesh; 65 65 Material *mCurrentMaterial; 66 //int mCurrentObjectId;66 bool mLoadPolygonsAsMeshes; 67 67 68 68 // Handlers for X3D … … 117 117 // ----------------------------------------------------------------------- 118 118 X3dViewCellsParseHandlers(ViewCellsManager *viewCellsManager, 119 float viewCellHeight);119 const float viewCellHeight); 120 120 ~X3dViewCellsParseHandlers(); 121 121 … … 156 156 ViewCellsManager *mViewCellsManager; 157 157 float mViewCellHeight; 158 158 159 159 160 VertexIndexContainer mCurrentVertexIndices; -
GTP/trunk/Lib/Vis/README_ONLINE.txt
r643 r657 4 4 1) Requirements: 5 5 WindowsXP 6 Ogre 1.03 for vs 7.17 Ogre Dependencies8 6 svn 9 7 … … 11 9 in the following it is assumed that your repository is located in e:\svn\gametools (not required, just replace your path) 12 10 13 deprecated: the current stable version is located in D:\gametools\branches\0.314 11 15 2) add following environment variables:16 OGRE_PATH: directory where ogre.sln is located 12 3) add following environment variables: 13 OGRE_PATH: directory where ogre.sln is located (in directory OGRE) 17 14 18 3) copy e:\svn\gametools\OGRE\trunk\ogre_changes into OGRE_PATH directory (only applies to version 1.03!!!!) 15 4) Set preprocessor flag GTP_VISIBILITY_MODIFIED_OGRE to the example projects you want to use 19 16 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 17 5) open scripts GTP\trunk\Lib\Vis\shared\GtpVisibility.sln and compile all 29 18 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 19 6) start TerrainExampleApplication for testing
Note: See TracChangeset
for help on using the changeset viewer.