Ignore:
Timestamp:
06/14/05 02:50:05 (20 years ago)
Author:
mattausch
Message:

added visibility queries

Location:
trunk/VUT/GtpVisibility/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp

    r119 r130  
    4848 
    4949                        if (!mHierarchyInterface->CheckFrustumVisible(node, intersects)) 
    50                         {//if (mHierarchyInterface->mIsShadowPass) 
     50                        { 
    5151                                mNumFrustumCulledNodes ++; 
    5252                                 
  • trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp

    r120 r130  
    77//----------------------------------------------------------------------- 
    88HierarchyInterface::HierarchyInterface():  
    9 mFrameId(0), mNumTraversedNodes(0), mNumRenderedNodes(0),  
    10 mSceneRoot(0), mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(false) 
     9mFrameId(0), mNumTraversedNodes(0), mSceneRoot(0),  
     10mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(false) 
    1111//, mIsShadowPass(false) 
    1212{        
     
    2626void HierarchyInterface::InitFrame(HierarchyNode *root) 
    2727{ 
    28         mFrameId ++; 
     28        ++ mFrameId; 
    2929        mCurrentTestIdx = 0; 
    3030        mNumTraversedNodes = 0; 
    31         mNumRenderedNodes = 0; 
     31        mRenderedNodes.clear(); 
    3232 
    3333        SetSceneRoot(root); 
     
    6363unsigned int HierarchyInterface::GetNumRenderedNodes() 
    6464{ 
    65         return mNumRenderedNodes; 
     65        return (unsigned int)mRenderedNodes.size(); 
    6666} 
    67  
     67//----------------------------------------------------------------------- 
    6868void HierarchyInterface::SetUseOptimization(bool useOptimization) 
    6969{ 
    7070        mUseOptimization = useOptimization; 
    7171} 
     72//----------------------------------------------------------------------- 
     73std::vector<HierarchyNode *> *HierarchyInterface::GetRenderedNodes() 
     74{ 
     75        return &mRenderedNodes; 
     76} 
    7277 
    7378} // namespace GtpVisibility 
  • trunk/VUT/GtpVisibility/src/QueryManager.cpp

    r71 r130  
    55  
    66QueryManager::QueryManager(HierarchyInterface *hierarchyInterface) 
     7:mHierarchyInterface(hierarchyInterface) 
    78{ 
    89} 
  • trunk/VUT/GtpVisibility/src/VisibilityManager.cpp

    r114 r130  
    8383        return mCullingManagerType; 
    8484} 
    85  
     85//----------------------------------------------------------------------- 
     86void VisibilityManager::SetQueryManager(QueryManager *queryManager) 
     87{ 
     88        mQueryManager = queryManager; 
     89} 
     90//----------------------------------------------------------------------- 
     91QueryManager *VisibilityManager::GetQueryManager() 
     92{ 
     93        return mQueryManager; 
     94} 
    8695} // namespace GtpVisibility 
Note: See TracChangeset for help on using the changeset viewer.