source: trunk/VUT/Ogre/include/OgrePlatformQueryManager.h @ 171

Revision 171, 1.8 KB checked in by mattausch, 19 years ago (diff)

fixed visibilityQueries

Line 
1#ifndef _PlatformQueryManager_H__
2#define _PlatformQueryManager_H__
3
4#include "VisibilityInfo.h"
5#include "QueryManager.h"
6#include "OgrePlatformHierarchyInterface.h"
7
8namespace Ogre {
9 
10/**
11        Class which implements the QueryManager for Ogre scene queries.
12*/
13class __declspec(dllexport) PlatformQueryManager: public GtpVisibility::QueryManager
14{
15public:
16    /** Constructor taking a hierarchy interface as an argument. This allows to operate
17            on different hierarchy types, while reusing the implementation of the query methods.
18    */
19        PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface,
20                                 Viewport *vp,
21                                                 bool renderPatches);
22   
23    /**
24        Uses the specified point to execute the visibility query in all directions.
25        @sa ComputeCameraVisibility()
26    */
27    void ComputeFromPointVisibility(const Vector3 &point,
28                               InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
29                               InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
30                                   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
31                               bool relativeVisibility = false);
32 
33        void ComputeCameraVisibility(const Camera &camera,
34                               InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
35                               InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
36                                   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
37                               bool relativeVisibility = false);
38 
39        bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false); 
40
41        /** Sets a viewport for rendering.
42        */
43        void SetViewport(Viewport *vp);
44       
45protected:
46
47        void InitItemBuffer(InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
48                                                InfoContainer<GtpVisibility::PatchInfo> *visiblePatches);
49
50        Viewport *mViewport;
51        bool mWasInitialised;
52        bool mRenderPatches;
53};
54
55} // namespace Ogre
56
57#endif // PlatformQueryManager
Note: See TracBrowser for help on using the repository browser.