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

added visibility queries

Location:
trunk/VUT/GtpVisibility/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibility/include/CoherentHierarchicalCullingManager.h

    r74 r130  
    88namespace GtpVisibility 
    99{ 
    10  
    11 typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair; 
    12 typedef std::queue<QueryPair> QueryQueue; 
    1310 
    1411/** Renders the scene with the coherent hierarchical culling algorithm.  
  • trunk/VUT/GtpVisibility/include/HierarchyInterface.h

    r112 r130  
    33 
    44#include "DistanceQueue.h" 
     5#include "VisibilityMesh.h" 
    56 
    67namespace GtpVisibility { 
    78 
    89enum  CullingType {QUERY_CULLED, FRUSTUM_CULLED}; 
     10 
     11typedef std::vector<HierarchyNode *> HierarchyNodeList; 
     12typedef std::vector<GtpVisibility::Mesh *> GeometryList; 
     13typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair; 
     14typedef std::queue<QueryPair> QueryQueue; 
    915 
    1016/**     Class which implements a hierarchy interface for a scene hierarchy. 
     
    2632        */ 
    2733        virtual void TraverseNode(HierarchyNode *node) = 0; 
    28         /** Renders current scene node . 
    29                 @param node current scene node to be rendered 
     34        /** Renders current hierarchy node. 
     35                @param node current hierarchy node to be rendered 
    3036        */ 
    3137        virtual void RenderNode(HierarchyNode *node) = 0; 
     
    119125                CullingType type) = NULL; 
    120126 
     127        /** Returns vector of previously rendered hierarchy nodes. 
     128        */ 
     129        std::vector<HierarchyNode *> *GetRenderedNodes(); 
     130        /** Returns vector of previoulsy rendered geometry. 
     131        */ 
     132         
     133        /** Issue a occlusion query for this mesh. 
     134                @param node the current mesh 
     135                @returns occlusion query for this node 
     136        */ 
     137        virtual GtpVisibility::OcclusionQuery *IssueOcclusionQuery(GtpVisibility::Mesh *mesh) = 0; 
     138 
     139        /** Returns geometry of hierarchy node.  
     140        */ 
     141        virtual void GetGeometry(GtpVisibility::HierarchyNode *node,     
     142                                                         GeometryList *geometryList,  
     143                                                         bool includeChildren) = 0; 
     144 
     145 
     146        /** Renders geometry. 
     147        */ 
     148        virtual void RenderGeometry(GtpVisibility::Mesh *geom) = 0; 
     149 
    121150protected: 
    122151         
     
    128157        //--- statistics 
    129158        unsigned int mNumTraversedNodes; 
    130         unsigned int mNumRenderedNodes; 
    131159 
    132160        DistanceQueue *mDistanceQueue; 
     
    134162        HierarchyNode *mPreviousNode; 
    135163 
    136          
     164        std::vector<HierarchyNode *> mRenderedNodes; 
    137165}; 
    138166} // namespace GtpVisibility 
  • trunk/VUT/GtpVisibility/include/QueryManager.h

    r113 r130  
    1111namespace GtpVisibility { 
    1212   
     13typedef std::vector<OcclusionQuery *> QueryList; 
     14 
    1315/** This abstract class defines interface for a specific visibility query 
    1416    algorithm. The interface supports two from point visibility queries and 
     
    2325public: 
    2426    /** Constructor taking a hierarchy interface as an argument. This allows to operate 
    25         onm different hierarchy types, while reusing the implementation of the query methods. 
     27        on different hierarchy types, while reusing the implementation of the query methods. 
    2628     */ 
    2729    QueryManager(HierarchyInterface *hierarchyInterface); 
     
    8183             ); 
    8284   
    83         /** Sets the scene traverser. 
    84       @remark the scene traverser depends on the type of hierarchyInterface the scene consists of. 
     85        /** Sets the hierarchy interface. 
     86      @remark the traversal depends on the type of hierarchyInterface the scene consists of. 
    8587        */ 
    86         void SetSceneTraverser(HierarchyInterface *hierarchyInterface); 
     88        void SetHierarchyInterface(HierarchyInterface *hierarchyInterface); 
    8789 
    8890protected: 
  • trunk/VUT/GtpVisibility/include/VisibilityInfo.h

    r71 r130  
    1616    NodeInfo(HierarchyNode *node,const float v): mNode(node), mVisibility(v) {} 
    1717 
     18        float GetVisibiliy() const {return mVisibility;} 
     19 
    1820protected: 
    1921    /** pointer to the scene node */ 
     
    3133public: 
    3234        MeshInfo(Mesh *mesh, const float v): mMesh(mesh), mVisibility(v) {} 
     35 
     36        float GetVisibiliy() const {return mVisibility;} 
    3337 
    3438protected: 
  • trunk/VUT/GtpVisibility/include/VisibilityManager.h

    r114 r130  
    5555        */ 
    5656        void SetUseChcOptimization(bool useOptimization); 
     57        /** Sets pointer to a query manager.  
     58        */ 
     59        void SetQueryManager(QueryManager *queryManager); 
     60        /** see set  
     61        */ 
     62        QueryManager *GetQueryManager(); 
    5763 
    5864protected: 
  • trunk/VUT/GtpVisibility/include/VisibilityMesh.h

    r71 r130  
    22#define _VisibilityMesh_H__ 
    33 
    4 #include "OgreMesh.h" 
     4//#include <OgreMesh.h> 
     5#include <OgreEntity.h> 
    56 
    67namespace GtpVisibility { 
    7   typedef Ogre::Mesh Mesh; 
     8  typedef Ogre::Entity Mesh; 
    89} 
    910 
Note: See TracChangeset for help on using the changeset viewer.