Changeset 347 for trunk/VUT/Ogre
- Timestamp:
- 10/24/05 16:37:50 (19 years ago)
- Location:
- trunk/VUT/Ogre
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h
r254 r347 92 92 void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 93 93 94 /** Override standard function so octree boxes are always of equal side length. 95 This has advantages for CHC, because terrain tiles are in different octree nodes 96 and can be culled. 97 */ 98 void setWorldGeometry( const String& filename ); 99 94 100 protected: 95 101 -
trunk/VUT/Ogre/resources/terrain.cfg
r346 r347 26 26 27 27 # How large is each tile? Must be (2^n)+1 and be smaller than PageSize 28 TileSize= 12928 TileSize=65 29 29 30 30 # The maximum error allowed when determining which LOD to use … … 34 34 PageWorldX=5000 35 35 PageWorldZ=5000 36 36 37 # Maximum height of the terrain 37 MaxHeight= 50038 MaxHeight=400 38 39 39 40 # Upper LOD limit -
trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp
r343 r347 94 94 //mItemBufferPass->setAmbient(1, 1, 0); 95 95 } 96 //------------------------------------------------------------------------- 97 void VisibilityTerrainSceneManager::setWorldGeometry( const String& filename ) 98 { 99 // Clear out any existing world resources (if not default) 100 if (ResourceGroupManager::getSingleton().getWorldResourceGroupName() != 101 ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) 102 { 103 ResourceGroupManager::getSingleton().clearResourceGroup( 104 ResourceGroupManager::getSingleton().getWorldResourceGroupName()); 105 } 106 mTerrainPages.clear(); 107 // Load the configuration 108 loadConfig(filename); 109 110 // Resize the octree, allow for 1 page for now 111 float max_x = mOptions.scale.x * mOptions.pageSize; 112 float max_y = mOptions.scale.y; 113 float max_z = mOptions.scale.z * mOptions.pageSize; 114 115 float maxAxis = std::max(max_x, max_y); 116 maxAxis = std::max(maxAxis, max_z); 117 resize( AxisAlignedBox( 0, 0, 0, maxAxis, maxAxis, maxAxis ) ); 118 119 setupTerrainMaterial(); 120 121 setupTerrainPages(); 122 123 } 124 96 125 //----------------------------------------------------------------------- 97 126 void VisibilityTerrainSceneManager::PrepareVisualization(Camera *cam)
Note: See TracChangeset
for help on using the changeset viewer.