Ignore:
Timestamp:
03/21/05 01:59:03 (19 years ago)
Author:
gametools
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingSceneManager.h

    r21 r22  
    2828 
    2929        typedef priority_queue<SceneNode *, vector<SceneNode *>, myless<vector<SceneNode *>::value_type> > PriorityQueue; 
    30  
     30        typedef queue<SceneNode *> QueryQueue; 
    3131        /** 
    3232                Class which implements a scene mangager which uses occlusion queries for culling occluded objects 
     
    3636        public: 
    3737                enum {RENDER_CULL_FRUSTUM, RENDER_STOP_AND_WAIT, RENDER_COHERENT, NUM_RENDERMODES}; 
    38  
     38                 
    3939                OcclusionCullingSceneManager(); 
     40                ~OcclusionCullingSceneManager(); 
    4041         
    4142                /** Overriden from SceneManager. */ 
    4243                void _renderVisibleObjects(void); 
    4344                void _findVisibleObjects(Camera* cam, bool onlyShadowCasters); 
    44          
     45                void _updateSceneGraph(Camera* cam); 
     46 
    4547        protected: 
     48                enum {MODE_QUERY, MODE_RENDER}; 
    4649 
     50                int isLeaf(SceneNode *node); 
     51                int countSceneNodes(SceneNode *node); 
    4752                void renderZPass(); 
    4853                void traverseNode(SceneNode *node); 
    49                 void renderSceneNode(SceneNode *node); 
    50                 void switchMode(bool switch2QueryMode); 
     54                /** Renders current node */ 
     55                void render(SceneNode *node); 
     56                /** Sets rendering mode, e.g. query mode or render mode*/ 
     57                void setRenderingMode(int mode); 
    5158                 
     59                /** Renders the scene with view frustum culling only. */ 
     60                void renderCullFrustum(); 
     61                /** Renders the scene with the hierarchical stop and wait algorithm. */ 
    5262                void renderStopAndWait(); 
    53                 /** renders the scene with view frustum culling only */ 
    54                 void renderCullFrustum(); 
     63                /** Renders the scene with the coherent hierarchical algorithm and the query queye. */ 
     64                void renderCoherentWithQueue(); 
     65                /** Issue a occlusion query for this node. */ 
     66                void issueOcclusionQuery(SceneNode *node, bool wasVisible); 
     67                /** Pulls up the visibility from the child nodes. */ 
     68                void pullUpVisibility(SceneNode *node); 
    5569 
    56                 void issueOcclusionQuery(SceneNode *node, bool wasVisible); 
     70                void deleteQueries(); 
    5771 
    5872                /** we use a priority queue rather than a renderstack */ 
    5973                PriorityQueue *mDistanceQueue;  
    60                 // RenderQueue* mDistanceQueue; 
    6174 
    62                 int mFrameID; 
    63                 int mVisibilityThreshold; 
     75                unsigned int mFrameID; 
     76                unsigned int mVisibilityThreshold; 
     77                unsigned int mNumSceneNodes; 
    6478                int mCurrentTestIdx; 
    65                 bool mIsQueryMode; 
    66  
     79                int mQueryMode; 
     80                 
    6781                std::vector<HardwareOcclusionQuery *> mOcclusionQueries; 
    6882        }; 
Note: See TracChangeset for help on using the changeset viewer.