source: GTP/trunk/Lib/Vis/OnlineCullingCHC/include/QueryManager.h @ 2280

Revision 2280, 3.7 KB checked in by mattausch, 18 years ago (diff)

removed dependency on ogre in gtpvisibility

RevLine 
[59]1#ifndef _VisibilityQueryManager_H__
2#define _VisibilityQueryManager_H__
3
[65]4#include <vector>
5
[59]6#include "VisibilityInfo.h"
[2280]7//#include "VisibilityCamera.h"
8//#include "VisibilityRay.h"
[59]9
[2280]10
[65]11namespace GtpVisibility {
[2280]12
13
[130]14typedef std::vector<OcclusionQuery *> QueryList;
15
[65]16/** This abstract class defines interface for a specific visibility query
17    algorithm. The interface supports two from point visibility queries and
18    the ray shooting query. The output of the queries consists of list of
19    visible meshes and hierarchy nodes. The from point queries will be implemented
20    either with item bufferring or based purelly on occlusion queries. Note that
21    the actuall implementation can also exploit the
22    output of the visibility preprocessor.
[59]23*/
[71]24class QueryManager
25{
26public:
[65]27    /** Constructor taking a hierarchy interface as an argument. This allows to operate
[2280]28                on different hierarchy types, while reusing the implementation of the query methods.
[65]29     */
[2280]30    //QueryManager(HierarchyInterface *hierarchyInterface, int queryModes);
31    QueryManager(int queryModes);
[59]32
[2280]33    /** Computes restricted visibility from point by using an explicit camera to execute
34                the visibility query.
35                @param camera The camera to be used
[65]36
[2280]37                @param visibleNodes Pointer to the container where visible nodes should be added.
38                This set is formed of visible leafs or fully visible interior nodes.
39                If NULL no visible nodes are not evaluated.
[65]40
[2280]41                @param visibleGeometry Pointer to the container where visible meshes should be added.
42                If NULL no visible meshes are not evaluated.
[897]43
[2280]44                @param visiblePatches Pointer to the container where visible patches should be added.
45                If NULL no visible meshes are not evaluated.
[65]46
[2280]47                @param relativeVisibility If true the visibility member for
48                NodeInfo and MeshInfo represent relative visibility; i.e. the number of visible
49                pixels divided by the the number of projected pixels.
50
51                @return true if the corresponding PVS exists.
[65]52    */
[2280]53    /*virtual void ComputeCameraVisibility(const Camera &camera,
54                                                                                 NodeInfoContainer *visibleNodes,
55                                                                                 MeshInfoContainer *visibleGeometry,
56                                                                                 PatchInfoContainer *visiblePatches,
57                                                                                 const bool relativeVisibility,
58                                                                                 const bool approximateVisibility) = 0;
59    */
[65]60    /**
61        Uses the specified point to execute the visibility query in all directions.
62        @sa ComputeCameraVisibility()
63    */
[2280]64    /*virtual void
[65]65    ComputeFromPointVisibility(const Vector3 &point,
[2280]66                                                           NodeInfoContainer *visibleNodes,
67                                                           MeshInfoContainer *visibleGeometry,
68                                                           PatchInfoContainer *visiblePatches,
69                                                           const bool relativeVisibility,
70                                                           const bool approximateVisibility) = 0;
71    */
[59]72  /**
[113]73      Ray shooting interface: finds an intersection with objects in the scene.
[65]74
75      @param ray The given input ray (assuming the ray direction is normalized)
76      @param visibleMeshes List of meshes intersecting the ray
77      @param isGlobalLine If false only first intersection with opaque object is returned.
78      Otherwise all intersections of the ray with the scene are found.
79
[2280]80          @return true if there is any intersection.
[71]81        */
[2280]82    /*virtual bool ShootRay(const Ray &ray,
83                                                  std::vector<Mesh *> *visibleMeshes,
84                                                  bool isGlobalLine = false);
85*/
[130]86        /** Sets the hierarchy interface.
87      @remark the traversal depends on the type of hierarchyInterface the scene consists of.
[71]88        */
[130]89        void SetHierarchyInterface(HierarchyInterface *hierarchyInterface);
[59]90
[174]91        enum {PATCH_VISIBILITY = 2,
92                  GEOMETRY_VISIBILITY = 4,
93                  NODE_VISIBILITY = 8};
94
[59]95protected:
96 
[2280]97        //HierarchyInterface *mHierarchyInterface;
[174]98        int mQueryModes; 
[59]99};
100
[65]101};
102
[59]103#endif // VisibilityQueryManager
Note: See TracBrowser for help on using the repository browser.