Ignore:
Timestamp:
06/14/07 17:24:08 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2402 r2455  
    311311        } 
    312312 
     313        ///////////// 
    313314        val = config.getSetting("OnlineCullingAlgorithm"); 
    314315                 
     
    357358 
    358359        ///////////// 
    359         // terrain options 
     360        val = config.getSetting("TestGeometryForVisibleLeaves"); 
     361 
     362        if (!val.empty()) 
     363        { 
     364                if (val == "yes") 
     365                        mVisibilityManager->SetTestGeometryForVisibleLeaves(true); 
     366                else 
     367                        mVisibilityManager->SetTestGeometryForVisibleLeaves(false); 
     368        } 
     369 
     370        ///////////// 
     371        val = config.getSetting("TestGeometryBounds"); 
     372 
     373        if (!val.empty()) 
     374        { 
     375                if (val == "yes") 
     376                        mHierarchyInterface->SetTestGeometryBounds(true); 
     377                else 
     378                        mHierarchyInterface->SetTestGeometryBounds(false); 
     379        } 
     380 
     381        ///////////// 
     382        val = config.getSetting("AssumedVisibleFrames"); 
     383 
     384        if (!val.empty()) 
     385        { 
     386                mVisibilityManager->SetAssumedVisibilityForChc(atoi(val.c_str())); 
     387        } 
     388 
     389 
     390        ///////////// 
     391        val = config.getSetting("RandomUpdateCandidates"); 
     392 
     393        if (!val.empty()) 
     394        { 
     395                mVisibilityManager->SetRandomUpdateCandidatesForRuc(atoi(val.c_str())); 
     396        } 
     397 
     398 
     399        ///////////// 
     400        // output 
    360401 
    361402        if (mUseDepthPass) 
     
    395436        else 
    396437                LogManager::getSingleton().logMessage("not flushing queue after some frames"); 
     438 
     439        if (mVisibilityManager->GetTestGeometryForVisibleLeaves()) 
     440                LogManager::getSingleton().logMessage("test geometry for visible leaves"); 
     441        else 
     442                LogManager::getSingleton().logMessage("not testing geometry for visible leaves"); 
     443         
     444        if (mHierarchyInterface->GetTestGeometryBounds()) 
     445                LogManager::getSingleton().logMessage("test geometry bounds instead of bounding box"); 
     446        else 
     447                LogManager::getSingleton().logMessage("not testing geometry bounds instead of bounding box"); 
     448 
     449 
     450        ///////////// 
     451        // terrain options 
    397452 
    398453        if (!mShowTerrain) 
     
    12631318        d << "Depth pass: " << StringConverter::toString(mUseDepthPass) << ", " 
    12641319          << "Delay transparents: " << StringConverter::toString(mDelayRenderTransparents) << ", " 
    1265           << "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", " 
     1320//        << "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", " 
    12661321          << "Algorithm type: " << mVisibilityManager->GetCullingManagerType() << ", " 
    12671322          << "Hierarchy nodes: " << mNumOctants << ", "  
     
    16861741                LogManager::getSingleton().logMessage("error: should not come here"); 
    16871742                // question: if no view cell, set everything visible? 
    1688                 //SetObjectsVisible(true); 
    16891743                SetObjectsVisible(false); 
    16901744                return; 
     
    16931747        //////////// 
    16941748        //-- set PVS of view cell to visible 
    1695  
    1696         //std::stringstream d; d << "appying new view cell pvs: " << vc->GetPvs().GetSize(); 
    1697         //LogManager::getSingleton().logMessage(d.str()); 
    16981749 
    16991750        GtpVisibilityPreprocessor::ObjectPvsIterator pit = vc->GetPvs().GetIterator(); 
     
    17171768        const GtpVisibilityPreprocessor::Vector3 viewPoint =  
    17181769                OgreTypeConverter::ConvertFromOgre(cam->getDerivedPosition()); 
    1719  
    1720         //std::stringstream d; d << "vp: " << viewPoint; 
    1721         //LogManager::getSingleton().logMessage(d.str()); 
    17221770 
    17231771        GtpVisibilityPreprocessor::ViewCell *newElementary =  
     
    21732221    } 
    21742222 
    2175         // Prepare render queue for receiving new objects 
    2176         //prepareRenderQueue(); 
    2177  
    21782223        mDestRenderSystem->_beginGeometryCount(); 
    21792224    // Begin the frame 
     
    22812326        /////////////////////// 
    22822327        //-- put items in render queue 
    2283         ////////// 
    22842328 
    22852329        getRenderQueue()->clear(); 
    22862330 
    2287         ////////////////////// 
    2288         //-- apply queries on geometry level 
    2289  
    22902331        if (!nodeVisibility) 
    22912332        { 
     2333                ////////////////// 
     2334                //-- apply queries on geometry level 
     2335 
    22922336                MeshInfoContainer::iterator geomIt, geomIt_end = visibleGeometry.end(); 
    22932337 
     
    23842428        if (camera->isWindowSet())   
    23852429        { 
    2386             const std::vector<Plane>& planeList =  
    2387                 camera->getWindowPlanes(); 
    2388             for (ushort i = 0; i < 4; ++i) 
     2430                        const std::vector<Plane>& planeList = camera->getWindowPlanes(); 
     2431 
     2432            for (ushort i = 0; i < 4; ++ i) 
    23892433            { 
    23902434                mDestRenderSystem->enableClipPlane(i, true); 
     
    24212465 
    24222466        RenderHierarchicalCulling(fillQueue); 
    2423         // _renderVisibleObjects(); 
    24242467    
    24252468    // End frame 
     
    25292572 
    25302573                if (mQueryMode == 2) 
    2531                 { 
    25322574                        approximateVisibility = true; 
    2533                 } 
    25342575        } 
    25352576        else 
     
    25422583                new OcclusionQueriesQueryManager(mHierarchyInterface, 
    25432584                                                                                 cam->getViewport(), 
    2544                                                                                  //mCurrentViewport, 
    25452585                                                                                 queryModes,  
    25462586                                                                                 itemBufferMode); 
Note: See TracChangeset for help on using the changeset viewer.