Ignore:
Timestamp:
05/01/06 00:08:09 (18 years ago)
Author:
mattausch
Message:

fitting objects to bb, debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilityTerrainSceneManager.cpp

    r865 r868  
    380380         
    381381                OctreeSceneManager::_renderVisibleObjects(); 
     382         
    382383        } // hierarchical culling 
    383384                 
     
    874875} 
    875876 
     877//------------------------------------------------------------------------- 
     878void VisibilityTerrainSceneManager::setWorldGeometry( const String& filename ) 
     879{ 
     880    // Clear out any existing world resources (if not default) 
     881    if (ResourceGroupManager::getSingleton().getWorldResourceGroupName() !=  
     882        ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) 
     883    { 
     884        ResourceGroupManager::getSingleton().clearResourceGroup( 
     885            ResourceGroupManager::getSingleton().getWorldResourceGroupName()); 
     886    } 
     887 
     888    mTerrainPages.clear(); 
     889    // Load the configuration 
     890    loadConfig(filename); 
     891 
     892    // Resize the octree, allow for 1 page for now 
     893    float max_x = mOptions.scale.x * mOptions.pageSize; 
     894    float max_y = mOptions.scale.y; 
     895    float max_z = mOptions.scale.z * mOptions.pageSize; 
     896 
     897        //-- note: slows down view frustum culling! 
     898#if 1 
     899        float maxAxis = std::max(max_x, max_y); 
     900        maxAxis = std::max(maxAxis, max_z); 
     901        resize( AxisAlignedBox( 0, 0, 0, maxAxis, maxAxis, maxAxis ) ); 
     902#else 
     903        resize( AxisAlignedBox( 0, 0, 0, max_x, max_y, max_z ) ); 
     904#endif 
     905 
     906    setupTerrainMaterial(); 
     907    setupTerrainPages(); 
     908 
     909 } 
     910 
    876911} // namespace Ogre 
Note: See TracChangeset for help on using the changeset viewer.