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

Revision 173, 2.0 KB checked in by mattausch, 19 years ago (diff)

did some code cleanup

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 CollectItemBufferResults(
48                                InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
49                                InfoContainer<GtpVisibility::PatchInfo> *visiblePatches);
50
51        void InitItemBuffer(InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
52                                                InfoContainer<GtpVisibility::PatchInfo> *visiblePatches);
53
54        Viewport *mViewport;
55        bool mWasInitialised;
56        bool mRenderPatches;
57};
58
59} // namespace Ogre
60
61#endif // PlatformQueryManager
Note: See TracBrowser for help on using the repository browser.