Ignore:
Timestamp:
03/22/05 14:51:26 (19 years ago)
Author:
gametools
Message:
 
Location:
trunk/VUT/OcclusionCullingSceneManager/include
Files:
1 added
1 deleted
1 edited

Legend:

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

    r23 r26  
    55#include "OgreSceneManager.h" 
    66#include "OgrePrerequisites.h" 
     7#include "OgreSolidHalfBoundingBox.h" 
    78#include <queue> 
    89 
     
    2728        }; 
    2829 
     30        typedef pair<SceneNode *, HardwareOcclusionQuery *> query_pair; 
    2931        typedef priority_queue<SceneNode *, vector<SceneNode *>, myless<vector<SceneNode *>::value_type> > PriorityQueue; 
    30         typedef queue<SceneNode *> QueryQueue; 
     32        typedef queue<query_pair> QueryQueue; 
    3133        /** 
    3234                Class which implements a scene mangager which uses occlusion queries for culling occluded objects 
     
    3537        { 
    3638        public: 
    37                 enum {RENDER_CULL_FRUSTUM, RENDER_STOP_AND_WAIT, RENDER_COHERENT, NUM_RENDERMODES}; 
    38                  
    3939                OcclusionCullingSceneManager(); 
    4040                ~OcclusionCullingSceneManager(); 
    4141         
    42                 /** Overriden from SceneManager. */ 
     42 
     43                enum {RENDER_CULL_FRUSTUM, RENDER_STOP_AND_WAIT, RENDER_COHERENT, NUM_RENDERMODES}; 
     44                 
     45                /** Overriden from SceneManager. Renders the scene with the specified algorithm 
     46                /** 
     47                        The algorithm is one of 
     48                        RENDER_CULL_FRUSTUM: renders the scene with view frustum culling only 
     49                        RENDER_STOP_AND_WAIT: renders the scene with the hierarchical stop and wait algorithm 
     50                        RENDER_COHERENT: renders the scene with the coherent hierarchical algorithm 
     51                */ 
    4352                void _renderVisibleObjects(void); 
    4453                void _findVisibleObjects(Camera* cam, bool onlyShadowCasters); 
     
    6473                void renderCoherentWithQueue(); 
    6574                /** Issue a occlusion query for this node. */ 
    66                 void issueOcclusionQuery(SceneNode *node, bool wasVisible); 
     75                HardwareOcclusionQuery *issueOcclusionQuery(SceneNode *node, bool wasVisible); 
    6776                /** Pulls up the visibility from the child nodes. */ 
    6877                void pullUpVisibility(SceneNode *node); 
     78                /** delete all previously defined occlusion queries */ 
     79                void deleteQueries(); 
     80                /** Renders bounding box of specified node. 
     81                @param the node which bounding box is to be rendered 
     82                */ 
     83                void renderBoundingBox(SceneNode *node); 
     84                /** Returns one half of the bounding box. 
     85                @param the half of the bouding box 
     86                */ 
     87                SolidHalfBoundingBox *getSolidHalfBoundingBox(int half); 
     88                /** sets the type of the algorithm 
     89                @param algorithm type 
     90                */ 
     91                void setAlgorithmType(int type); 
     92         
     93                int getAlgorithmType(); 
    6994 
    70                 void deleteQueries(); 
    71  
    72                 /** we use a priority queue rather than a renderstack */ 
     95                // we use a priority queue rather than a renderstack 
    7396                PriorityQueue *mDistanceQueue;  
    74  
     97                 
    7598                unsigned int mFrameId; 
    7699                unsigned int mVisibilityThreshold; 
     
    80103                 
    81104                std::vector<HardwareOcclusionQuery *> mOcclusionQueries; 
     105                // two halfes of a aabb 
     106                SolidHalfBoundingBox *mHalfBoundingBox[2];       
     107                int mAlgorithmType; 
    82108        }; 
    83109 
Note: See TracChangeset for help on using the changeset viewer.