Ignore:
Timestamp:
04/12/05 10:50:19 (19 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/OcclusionCullingSceneManager/include
Files:
3 edited

Legend:

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

    r41 r42  
    5858                         
    5959                        @param cam current camera 
    60                         @param root root of hierarchy  
    6160                */ 
    62                 void renderScene( Camera *cam, SceneNode *root ); 
     61                void renderScene( Camera *cam ); 
    6362         
    64                  
    6563                /** Sets the given option for the scene traverser. 
    6664                               @remarks 
     
    8482                void setRenderSystem( RenderSystem *rsys ); 
    8583                 
    86                 /** Doing some necessary preprocessing. 
    87                 @comment e.g., initialises occlusion queries */ 
    88                 void preprocess( void ); 
    89  
    9084                /** Sets the current number of scene nodes in the scene. 
    9185                @param num number of scene nodes 
     
    9387                void setNumSceneNodes(int num ); 
    9488 
     89                /** Sets the root of the scene hierarchy. */ 
     90                void setSceneRoot(SceneNode *root); 
     91 
    9592                /** Sets the required number of occlusion queries. 
    9693                @param num number occlusion queries 
    9794                */ 
    98                 void setNumQueries( int num ); 
     95                //void setNumQueries( int num ); 
     96 
     97                /** Doing some necessary preprocessing. 
     98                @comment e.g., initialises occlusion queries */ 
     99                //void preprocess( void ); 
    99100 
    100101        protected: 
     
    113114                /** Sets rendering mode, e.g. query mode or render mode*/ 
    114115                void setRenderingMode( int mode ); 
     116                 
     117                 
    115118                /** Renders the scene with view frustum culling only. */ 
    116                 void renderCullFrustum( Camera *cam ); 
     119                virtual void renderCullFrustum( Camera *cam ); 
    117120                /** Renders the scene with the hierarchical stop and wait algorithm. */ 
    118                 void renderStopAndWait( Camera *cam ); 
     121                virtual void renderStopAndWait( Camera *cam ); 
    119122                /** Renders the scene with the coherent hierarchical algorithm and the query queye. */ 
    120                 void renderCoherentWithQueue( Camera *cam ); 
     123                virtual void renderCoherentWithQueue( Camera *cam ); 
     124 
    121125                /** Issue a occlusion query for this node.  
    122126                @param box the axis aligned bounding box of the node 
     
    124128                */ 
    125129                HardwareOcclusionQuery *issueOcclusionQuery( AxisAlignedBox *box, bool wasVisible ); 
     130                /** Returns next available occlusion query or creates new one. 
     131                @return the next occlusion query 
     132                */ 
     133                HardwareOcclusionQuery *getNextOcclusionQuery(void); 
    126134                /** Pulls up the visibility from the child nodes. */ 
    127                 void pullUpVisibility( SceneNode *node ); 
     135                void pullUpVisibility( Camera *cam, SceneNode *node ); 
    128136                /** delete all previously defined occlusion queries */ 
    129137                void deleteQueries(); 
     
    136144                SolidHalfBoundingBox *getSolidHalfBoundingBox( int half ); 
    137145 
    138                 // we use a priority queue rather than a renderstack 
    139                 PriorityQueue *mDistanceQueue;  
     146                /** Initialises the distance queue. */ 
     147                virtual void initDistanceQueue(Camera *cam); 
    140148                 
    141149                std::vector<HardwareOcclusionQuery *> mOcclusionQueries; 
     
    150158                SceneManager *mSceneManager; 
    151159                RenderSystem *mRenderSystem; 
    152  
     160         
    153161                int mCurrentTestIdx; 
    154162                int mQueryMode; 
     
    162170                unsigned int mNumFrustumCulledNodes; 
    163171                unsigned int mNumRenderedGeometry; 
     172 
     173        private: 
     174                // the scene root 
     175                SceneNode *mSceneRoot; 
     176                // we use a priority queue ordered by distance 
     177                PriorityQueue *mDistanceQueue;  
    164178        }; 
    165179 
  • trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneManager.h

    r41 r42  
    5858                @param root current octree 
    5959                */ 
    60                 unsigned int countOctreeSize(Octree *root); 
     60                //unsigned int countOctreeSize(Octree *root); 
    6161 
    6262                OcclusionCullingTerrainSceneTraverser *mOcclusionCullingTerrainSceneTraverser; 
    63                 //OcclusionCullingSceneTraverser *mOcclusionCullingTerrainSceneTraverser; 
    6463        }; 
    6564 
  • trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingTerrainSceneTraverser.h

    r41 r42  
    4141        typedef pair<Octree *, HardwareOcclusionQuery *> OctreeQueryPair; 
    4242        typedef priority_queue<Octree *, vector<Octree *>, octreeless<vector<Octree *>::value_type> > OctreePriorityQueue; 
    43         //typedef queue<QueryPair> QueryQueue; 
     43        typedef queue<OctreeQueryPair> OctreeQueryQueue; 
    4444 
    4545        class OcclusionCullingTerrainSceneTraverser: public OcclusionCullingSceneTraverser 
     
    4747        public: 
    4848                OcclusionCullingTerrainSceneTraverser(SceneManager *sm, RenderSystem *rsys); 
    49                 void renderScene( Camera *cam, Octree *root ); 
     49                ~OcclusionCullingTerrainSceneTraverser(); 
     50                //void renderScene( Camera *cam ); 
     51                void setSceneRoot(Octree *root); 
     52                /** Sets the number of nodes in this octree  
     53                @remark do not confuse this with the OctreeNode class  
     54                which is derived from SceneNode 
     55                @param num number of nodes in the octree 
     56                */ 
     57                void setNumOctreeNodes( unsigned int num ); 
     58         
     59                /** Gets the given option for the scene traverser. 
     60                @remarks 
     61                    See setOption 
     62                */ 
     63                bool getOption( const String &, void * ); 
     64                bool getOptionKeys( StringVector &refKeys ); 
    5065                 
    5166        protected: 
     
    5873                /** Issue a occlusion query for this node. */ 
    5974                 
    60                 void pullUpVisibility( Octree *octree ); 
     75                void initDistanceQueue(Camera *cam); 
     76                void pullUpVisibility( Camera *cam, Octree *octree ); 
    6177                void traverseOctant(Camera *cam, Octree *octant ); 
    6278                void renderOctant( Camera *cam, Octree *octant ); 
     79                bool isLeaf(Octree *octant); 
    6380 
    64                 OctreePriorityQueue *mDistanceQueue; 
     81        private: 
     82                OctreePriorityQueue *mOctreeDistanceQueue; 
     83                // the octree root 
     84                Octree *mOctreeSceneRoot; 
     85 
     86                unsigned int mNumOctreeNodes; 
    6587        }; 
    6688 
Note: See TracChangeset for help on using the changeset viewer.