Ignore:
Timestamp:
06/14/07 17:24:08 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
Files:
12 edited

Legend:

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

    r2348 r2455  
    8484        // reuse box if node is the same 
    8585        // only create renderable bounding box for new node 
    86         if (node != mSavedNode) 
     86        if (node != mOldNode) 
    8787        { 
    88                 mSavedNode = node; 
     88                mOldNode = node; 
    8989                mBox = BIHNODEPTR_CAST(node)->_getWorldAABB(); 
    9090        } 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBiHierarchySceneManager.cpp

    r2402 r2455  
    14291429        d << "Depth pass: " << StringConverter::toString(mUseDepthPass) << ", " 
    14301430                << "Delay transparents: " << StringConverter::toString(mDelayRenderTransparents) << ", " 
    1431                 << "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", " 
     1431                //<< "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", " 
    14321432                << "Algorithm type: " << mVisibilityManager->GetCullingManagerType() << ", " 
    14331433                << "Hierarchy nodes: " << (mBiHierarchy ? mBiHierarchy->getTreeStats().mNumNodes : 0) << ", "  
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp

    r2280 r2455  
    8484        // reuse box if node is the same 
    8585        // only create renderable bounding box for new node 
    86         if (node != mSavedNode) 
     86        if (node != mOldNode) 
    8787        { 
    88                 mSavedNode = node; 
     88                mOldNode = node; 
    8989                mBox = KDNODEPTR_CAST(node)->_getWorldAABB(); 
    9090        } 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp

    r2130 r2455  
    14191419        d << "Depth pass: " << StringConverter::toString(mUseDepthPass) << ", " 
    14201420                << "Delay transparents: " << StringConverter::toString(mDelayRenderTransparents) << ", " 
    1421                 << "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", " 
     1421                //<< "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", " 
    14221422                << "Algorithm type: " << mVisibilityManager->GetCullingManagerType() << ", " 
    14231423                << "Hierarchy nodes: " << (mKdTree ? mKdTree->getTreeStats().mNumNodes : 0) << ", "  
  • 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); 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp

    r2360 r2455  
    33#include <OgreLogManager.h> 
    44#include <OgreStringConverter.h> 
     5#include <OgreOctreeNode.h> 
    56 
    67 
     
    187188} 
    188189//----------------------------------------------------------------------- 
    189 void OctreeHierarchyInterface::DetermineVisibilityRatio(GtpVisibility::HierarchyNode *node) const 
    190 {        
    191 #if 0    
    192         Octree *octant = static_cast<Octree *>(node); 
    193  
    194         // node not visited in this frame => no change 
    195         if (octant->lastVisited() != mFrameId) 
    196                 return; 
    197          
    198         // leaf node: terminate recursion 
    199         if (IsLeaf(node)) 
    200         { 
    201                 octant->setNumLeaves(1);         
    202                 octant->setNumVisibleLeaves(octant->isOctreeVisible() ? 1 : 0);  
    203                 return; 
    204         } 
    205  
    206         int numVisibleLeaves = 0; 
    207         int numLeaves = 0; 
    208  
    209         Octree *nextChild; 
    210          
    211         for (int i = 0; i < 8; ++ i) 
    212         { 
    213                 int x = (i & 4) / 4; 
    214                 int y = (i & 2) / 2; 
    215                 int z = i & 1; 
    216  
    217                 nextChild = octant->mChildren[x][y][z]; 
    218  
    219                 if (!nextChild) 
    220                         continue; 
    221                  
    222                 // recursive traversal 
    223                 DetermineVisibilityRatio(nextChild); 
    224                  
    225                 // this leaf is not fully visible 
    226                 numLeaves += nextChild->getNumLeaves(); 
    227                 numVisibleLeaves += nextChild->getNumVisibleLeaves(); 
    228         } 
    229  
    230         octant->setNumLeaves(numLeaves); 
    231         octant->setNumVisibleLeaves(numVisibleLeaves); 
    232 #endif 
    233 } 
    234 //----------------------------------------------------------------------- 
    235190void OctreeHierarchyInterface::RenderNode(GtpVisibility::HierarchyNode *node) 
    236191{ 
     
    290245} 
    291246//----------------------------------------------------------------------- 
    292 float OctreeHierarchyInterface::GetNodeVisibilityRatio(GtpVisibility::HierarchyNode *node) const 
    293 { 
    294 #if 0 
    295         return static_cast<Octree *>(node)->getVisibilityRatio(); 
    296 #else 
    297         return 1.0f; 
    298 #endif 
    299 } 
    300 //----------------------------------------------------------------------- 
    301247unsigned int OctreeHierarchyInterface::LastVisited(GtpVisibility::HierarchyNode *node) const 
    302248{ 
     
    312258        // reuse box if node is the same 
    313259        // only create renderable bounding box for new node 
    314         if (node != mSavedNode) 
    315         { 
    316                 mSavedNode = node; 
     260        if (node != mOldNode) 
     261        { 
     262                mOldNode = node; 
    317263            //static_cast<Octree *>(node)->_getCullBounds(&mBox); 
    318264                mBox = static_cast<Octree *>(node)->_getWorldAABB(); 
     
    374320                         
    375321                        for (int z = 0; z < 2; ++ z) 
    376                         {        
    377322                                for (int y = 0; y < 2; ++ y) 
    378                                 { 
    379323                                        for (int x = 0; x < 2; ++ x) 
    380                                         { 
    381324                                                if ((child = octree->mChildren[x][y][z]) != NULL) 
    382                                                 { 
    383325                                                        tStack.push(child); 
    384                                                 } 
    385                                         } 
    386                                 } 
    387                         } 
    388326                } 
    389327        } 
     
    394332{ 
    395333        Octree *octree = static_cast<Octree *>(node); 
    396  
    397334        return octree->getParent(); 
    398335} 
     336//----------------------------------------------------------------------- 
     337int OctreeHierarchyInterface::GetNodeAssumedVisible(GtpVisibility::HierarchyNode *node) 
     338{ 
     339        Octree *octree = static_cast<Octree *>(node); 
     340        return octree->getAssumedVisible(); 
     341} 
     342//----------------------------------------------------------------------- 
     343void OctreeHierarchyInterface::SetNodeAssumedVisible(GtpVisibility::HierarchyNode *node, int assumedVisible) 
     344{ 
     345        Octree *octree = static_cast<Octree *>(node); 
     346        octree->setAssumedVisible(assumedVisible); 
     347} 
     348//----------------------------------------------------------------------- 
     349void OctreeHierarchyInterface::DecNodeAssumedVisible(GtpVisibility::HierarchyNode *node) 
     350{ 
     351        Octree *octree = static_cast<Octree *>(node); 
     352        octree->decAssumedVisible(); 
     353} 
     354//----------------------------------------------------------------------- 
     355void OctreeHierarchyInterface::RenderGeometryBounds(GtpVisibility::HierarchyNode *node) 
     356{ 
     357        Octree *octree = static_cast<Octree *>(node); 
     358 
     359        NodeList::iterator it, it_end = octree->mNodes.end(); 
     360 
     361    for (it = octree->mNodes.begin(); it != it_end; ++ it) 
     362    { 
     363                RenderBoundingBox(&(*it)->_getWorldAABB()); 
     364    }    
     365} 
     366 
    399367 
    400368} // namespace Ogre 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformHierarchyInterface.cpp

    r2318 r2455  
    9999        mRenderSystem->_setWorldMatrix(Ogre::Matrix4::IDENTITY); 
    100100        mSceneManager->useRenderableViewProjModeWrapper(solidBox); 
    101         // HACK! (mySetPass should be setPass) 
     101         
    102102        // set no depth write, no color, no lighting material 
    103103        mSceneManager->setPassWrapper(solidBox->getTechnique()->getPass(0)); 
    104         //mSceneManager->_setPass(solidBox->getTechnique()->getPass(0));  
    105         //SetOcclusionPass(); 
    106  
    107104        solidBox->SetupBoundingBoxVertices(*box); 
    108105 
    109106        solidBox->getRenderOperation(ro); 
    110107        ro.srcRenderable = solidBox; 
     108         
    111109        //std::stringstream d; 
    112110        //d << "vt2: " << ro.vertexData; 
     
    132130        { 
    133131                mOcclusionQueries.push_back(new PlatformOcclusionQuery(mRenderSystem)); 
    134  
    135                 /*std::stringstream d; 
    136                 d << "resizing queries: " << (int)mOcclusionQueries.size() << std::endl; 
    137                 LogManager::getSingleton().logMessage(d.str());*/ 
    138132        } 
    139133         
     
    147141        GtpVisibility::HierarchyInterface::InitTraversal(); 
    148142         
    149         mSavedNode = NULL; 
     143        mOldNode = NULL; 
    150144        mLeavePassesInQueue = leavePassesInQueue; 
    151145 
     
    181175GtpVisibility::OcclusionQuery *PlatformHierarchyInterface::IssueNodeOcclusionQuery( 
    182176                                                                              GtpVisibility::HierarchyNode *node,  
    183                                                                                                                                                   const bool wasVisible)  
     177                                                                                                                                                  const bool testGeometry)  
    184178{ 
    185179        // get next available test id 
     
    189183        query->BeginQuery(); 
    190184         
    191         // if node is leaf and was visible => will be rendered anyway. 
    192         // In this case we can also test with the real geometry. 
    193         // If camera for culling is different from camera for rendering or only solids  
    194         // will be rendered => cannot optimize 
    195         if (mTestGeometryForVisibleLeaves && (mCamera == mCullCamera) && wasVisible && IsLeaf(node))  
    196         { 
     185        if (testGeometry && IsLeaf(node)) 
     186        { 
     187                // if node is a leaf and was visible => will be rendered anyway. 
     188                // In this case we can also test with the real geometry. 
    197189                RenderNode(node); 
    198190        } 
    199         else 
    200         { 
    201                 // this information is used e.g., by the scene graph, because the bounding box 
    202                 // must be treated differently to the scene geometry during rendering 
    203                 mIsBoundingBoxQuery = true; 
    204                 RenderBoundingBox(GetBoundingBox(node)); 
    205  
    206                 mIsBoundingBoxQuery = false; 
     191        else  
     192        { 
     193                if (mTestGeometryBounds && IsLeaf(node)) 
     194                { 
     195                        mIsBoundingBoxQuery = true; 
     196                        // we can also test the tighter bounds of the geometry instead of the hierarchy nodes. 
     197                        RenderGeometryBounds(node); 
     198                        mIsBoundingBoxQuery = false; 
     199                } 
     200                else 
     201                { 
     202                        // this information is used e.g., by the scene graph, because the bounding box 
     203                        // must be treated differently to the scene geometry during rendering 
     204                        mIsBoundingBoxQuery = true; 
     205                        RenderBoundingBox(GetBoundingBox(node)); 
     206                        mIsBoundingBoxQuery = false; 
     207                } 
    207208        } 
    208209 
     
    236237        //////// 
    237238        //-- the actual query test 
    238  
    239239        query->BeginQuery(); 
     240 
    240241        RenderGeometry(mesh); 
     242         
    241243        query->EndQuery(); 
    242244 
     
    244246} 
    245247//----------------------------------------------------------------------- 
    246 /*void PlatformHierarchyInterface::SetOcclusionPass() 
    247 { 
    248     // disable vertex and fragment program 
    249         mRenderSystem->unbindGpuProgram(GPT_VERTEX_PROGRAM); 
    250         mRenderSystem->unbindGpuProgram(GPT_FRAGMENT_PROGRAM); 
    251          
    252         // disable lighting 
    253         mRenderSystem->setLightingEnabled(false); 
    254  
    255     // Disable remaining texture units 
    256     mRenderSystem->_disableTextureUnitsFrom(0); 
    257  
    258     //--Set up non-texture related material settings 
    259     
    260         // Depth buffer settings 
    261         mRenderSystem->_setDepthBufferParams(true, false, CMPF_LESS_EQUAL); 
    262         // Set colour write mode off 
    263         mRenderSystem->_setColourBufferWriteEnabled(false, false, false, false); 
    264 }*/ 
    265 //----------------------------------------------------------------------- 
    266248SolidBoundingBox *PlatformHierarchyInterface::GetSolidBoundingBox() 
    267249{ 
    268250        if (!mSolidBoundingBox) 
    269         { 
    270251                mSolidBoundingBox = new SolidBoundingBox; 
    271                 //LogManager::getSingleton().logMessage("solid box created"); 
    272         } 
    273252 
    274253        return mSolidBoundingBox; 
     
    285264} 
    286265//----------------------------------------------------------------------- 
    287 bool PlatformHierarchyInterface::GetTestGeometryForVisibleLeaves() 
    288 { 
    289         return mTestGeometryForVisibleLeaves; 
    290 } 
    291 //----------------------------------------------------------------------- 
    292266bool PlatformHierarchyInterface::IsBoundingBoxQuery() 
    293267{ 
     
    314288        return mRenderSystem; 
    315289} 
     290//----------------------------------------------------------------------- 
     291void PlatformHierarchyInterface::SetTestGeometryBounds(bool testGeometryBounds) 
     292{ 
     293        mTestGeometryBounds = testGeometryBounds; 
     294} 
     295//----------------------------------------------------------------------- 
     296int PlatformHierarchyInterface::GetTestGeometryBounds() 
     297{ 
     298        return mTestGeometryBounds; 
     299} 
    316300 
    317301} // namespace Ogre 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp

    r2280 r2455  
    1212namespace Ogre { 
    1313 
    14 //-----------------------------------------------------------------------  
    15 /* 
    16 PlatformQueryManager::PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface,  
    17                                                                                    Viewport *vp,  
    18                                                                                    int queryModes): 
    19 //QueryManager(hierarchyInterface, queryModes),  
    20 QueryManager(queryModes), 
    21 mViewport(vp),  
    22 mWasInitialised(false), 
    23 mHierarchyInterface(hierarchyInterface) 
    24 { 
    25 }*/ 
    26 //----------------------------------------------------------------------- 
    27 /*bool PlatformQueryManager::ShootRay(const Ray &ray,  
    28                                                                         std::vector<Mesh *> *visibleMeshes,  
    29                                                                         bool isGlobalLine) 
    30 { 
    31     // run OGRE ray shooting query 
    32     return false; 
    33 }*/ 
     14 
    3415//----------------------------------------------------------------------- 
    3516void PlatformQueryManager::ComputeFromPointVisibility( 
     
    4122                                                                                        const bool approximateVisibility) 
    4223{ 
    43         SceneManager *sm = 
    44                 static_cast<PlatformHierarchyInterface *> 
     24        SceneManager *sm = static_cast<PlatformHierarchyInterface *> 
    4525                                                                (mHierarchyInterface)->GetSceneManager(); 
    4626 
     
    9575                                            relativeVisibility, 
    9676                                                                approximateVisibility); 
    97                 //mViewport->getTarget()->update(); for(int j=0; j<10000000; j++)       printf("wait"); 
    9877 
    9978                // permute directions 
     
    176155        uchar *buf = mViewport->getTarget()->getBufferContents(dimx, dimy); 
    177156 
    178         //std::stringstream d; d << "dimx: " << dimx << ", dimy: " << dimy; LogManager::getSingleton().logMessage(d.str()); 
    179  
    180157        // loop through frame buffer and collect visible pixels 
    181158        for (int idx = 0; idx < dimy * dimx * 3; idx += 3) 
     
    185162                id += buf[idx + 1] << 8; 
    186163                id += buf[idx + 2]; 
    187  
    188                 //std::stringstream d; d << "myid: " << (int)buf[idx] << " " << (int)buf[idx + 1] << " " << (int)buf[idx + 2]; LogManager::getSingleton().logMessage(d.str()); 
    189164 
    190165                // if valid id <= add visibility (id values start at 1) 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneContentGenerator.cpp

    r2280 r2455  
    1212namespace Ogre { 
    1313 
     14 
     15 
    1416/*************************************************************/ 
    1517/*           SceneContentGenerator implementation            */ 
     
    169171                        &mScale.x, &mScale.y, &mScale.z); 
    170172 
    171                 GenerateSceneObject(position, orientation, objName); 
    172                  
    173                 //std::stringstream d; d << StringConverter::toString(position) << " " << StringConverter::toString(orientation); 
    174                 //LogManager::getSingleton().logMessage(d.str()); 
    175         } 
     173                GenerateSceneObject(position, orientation, objName);     
     174        } 
     175 
    176176        ifstr.close(); 
    177177 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneNodeHierarchyInterface.cpp

    r2280 r2455  
    121121{ 
    122122        // only create renderable bounding box for new node 
    123         if (node != mSavedNode) 
     123        if (node != mOldNode) 
    124124        { 
    125                 mSavedNode = node; 
     125                mOldNode = node; 
    126126                mBox = static_cast<SceneNode *>(node)->_getWorldAABB(); 
    127127        } 
     
    151151                { 
    152152                        Entity *ent = static_cast<Entity *>(movable); 
    153                         //std::stringstream d; d << "ent " << ent->getName();  
    154                         //LogManager::getSingleton().logMessage(d.str()); 
    155153                        geometryList->push_back(ent); 
    156154                } 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp

    r2184 r2455  
    7171         /// Upload the index data to the card 
    7272         ibuf->writeData(0, ibuf->getSizeInBytes(), faces, true); 
    73          //mRenderOp.useSharedVertices = true; 
    7473         mRenderOp.indexData->indexBuffer = ibuf; 
    7574         // set material with no lighting, no color, no depth write 
    7675         SetOcclusionQueryMaterial(); 
    77          //setMaterial("BaseWhiteNoLighting"); 
    78  
    79         /* std::stringstream d; 
    80         d << "vtx: " << mRenderOp.vertexData; 
    81         LogManager::getSingleton().logMessage(d.str()); 
    82         */ 
    83  
    8476} 
    8577//----------------------------------------------------------------------- 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilityOptionsManager.cpp

    r2171 r2455  
    2424                return true; 
    2525        } 
     26 
    2627        if (key == "Threshold") 
    2728        { 
     
    3637        if (key == "TestGeometryForVisibleLeaves") 
    3738        { 
    38                 mHierarchyInterface->TestGeometryForVisibleLeaves(*static_cast<const bool *>(val)); 
     39                mVisibilityManager->SetTestGeometryForVisibleLeaves(*static_cast<const bool *>(val)); 
    3940                return true; 
    4041        } 
     
    7576                return true; 
    7677        } 
     78        if (key == "TestGeometryForVisibleLeaves") 
     79        { 
     80                * static_cast<bool *>(val) =  
     81                        mVisibilityManager->GetTestGeometryForVisibleLeaves(); 
     82                return true; 
     83        } 
     84        if (key == "AssumedVisibility") 
     85        { 
     86                * static_cast<unsigned int *>(val) =  
     87                        mVisibilityManager->GetAssumedVisibilityForChc(); 
     88                return true; 
     89        } 
     90        if (key == "TestGeometryForVisibleLeaves") 
     91        { 
     92                * static_cast<unsigned int *>(val) =  
     93                        mVisibilityManager->GetRandomUpdateCandidatesForRuc(); 
     94                return true; 
     95        } 
    7796         
    7897        return false; 
Note: See TracChangeset for help on using the changeset viewer.