source: OGRE/trunk/include/OgrePlatformQueryManager.h @ 316

Revision 316, 1.9 KB checked in by mattausch, 19 years ago (diff)

queries are realized as templates

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, int queryModes);
21   
22    /**
23        Uses the specified point to execute the visibility query in all directions.
24        @sa ComputeCameraVisibility()
25    */
26    void ComputeFromPointVisibility(const Vector3 &point,
27                               GtpVisibility::NodeInfoContainer *visibleNodes,
28                               GtpVisibility::MeshInfoContainer *visibleGeometry,
29                                   GtpVisibility::PatchInfoContainer *visiblePatches,
30                               bool relativeVisibility = false);
31 
32        void ComputeCameraVisibility(const Camera &camera,
33                               GtpVisibility::NodeInfoContainer *visibleNodes,
34                               GtpVisibility::MeshInfoContainer *visibleGeometry,
35                                   GtpVisibility::PatchInfoContainer *visiblePatches,
36                               bool relativeVisibility = false);
37 
38        bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false); 
39
40        /** Sets a viewport for rendering.
41        */
42        void SetViewport(Viewport *vp);
43
44protected:
45
46        void CollectItemBufferResults(
47                                GtpVisibility::MeshInfoContainer *visibleGeometry,
48                                GtpVisibility::PatchInfoContainer *visiblePatches);
49
50        void InitItemBuffer(GtpVisibility::MeshInfoContainer *visibleGeometry,
51                                                GtpVisibility::PatchInfoContainer *visiblePatches);
52
53        Viewport *mViewport;
54       
55        bool mWasInitialised;
56};
57
58} // namespace Ogre
59
60#endif // PlatformQueryManager
Note: See TracBrowser for help on using the repository browser.