1 | #ifndef _PlatformQueryManager_H__
|
---|
2 | #define _PlatformQueryManager_H__
|
---|
3 |
|
---|
4 | #include "VisibilityInfo.h"
|
---|
5 | #include "QueryManager.h"
|
---|
6 | #include "HierarchyInterface.h"
|
---|
7 |
|
---|
8 | namespace Ogre {
|
---|
9 |
|
---|
10 | /**
|
---|
11 | Class which implements the QueryManager for Ogre scene queries.
|
---|
12 | */
|
---|
13 | class __declspec(dllexport) PlatformQueryManager: public GtpVisibility::QueryManager
|
---|
14 | {
|
---|
15 | public:
|
---|
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(GtpVisibility::HierarchyInterface *hierarchyInterface,
|
---|
20 | Viewport *vp,
|
---|
21 | int queryModes);
|
---|
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 | GtpVisibility::NodeInfoContainer *visibleNodes,
|
---|
29 | GtpVisibility::MeshInfoContainer *visibleGeometry,
|
---|
30 | GtpVisibility::PatchInfoContainer *visiblePatches,
|
---|
31 | const bool relativeVisibility,
|
---|
32 | const bool approximateVisibility);
|
---|
33 |
|
---|
34 | void ComputeCameraVisibility(const Camera &camera,
|
---|
35 | GtpVisibility::NodeInfoContainer *visibleNodes,
|
---|
36 | GtpVisibility::MeshInfoContainer *visibleGeometry,
|
---|
37 | GtpVisibility::PatchInfoContainer *visiblePatches,
|
---|
38 | const bool relativeVisibility,
|
---|
39 | const bool approximateVisibility);
|
---|
40 |
|
---|
41 | bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false);
|
---|
42 |
|
---|
43 | /** Sets a viewport for rendering.
|
---|
44 | */
|
---|
45 | void SetViewport(Viewport *vp);
|
---|
46 |
|
---|
47 | protected:
|
---|
48 | #ifdef ITEM_BUFFER
|
---|
49 | void CollectItemBufferResults(
|
---|
50 | GtpVisibility::MeshInfoContainer *visibleGeometry,
|
---|
51 | GtpVisibility::PatchInfoContainer *visiblePatches);
|
---|
52 |
|
---|
53 | void InitItemBuffer(GtpVisibility::MeshInfoContainer *visibleGeometry,
|
---|
54 | GtpVisibility::PatchInfoContainer *visiblePatches);
|
---|
55 | #endif // ITEM_BUFFER
|
---|
56 |
|
---|
57 | Viewport *mViewport;
|
---|
58 |
|
---|
59 | bool mWasInitialised;
|
---|
60 | };
|
---|
61 |
|
---|
62 | } // namespace Ogre
|
---|
63 |
|
---|
64 | #endif // PlatformQueryManager
|
---|