[133] | 1 | #ifndef _PlatformQueryManager_H__ |
---|
| 2 | #define _PlatformQueryManager_H__ |
---|
| 3 | |
---|
| 4 | #include "VisibilityInfo.h" |
---|
| 5 | #include "QueryManager.h" |
---|
| 6 | #include "OgrePlatformHierarchyInterface.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
|
---|
[171] | 17 | on different hierarchy types, while reusing the implementation of the query methods.
|
---|
[133] | 18 | */
|
---|
[171] | 19 | PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface,
|
---|
[174] | 20 | Viewport *vp, int queryModes);
|
---|
[133] | 21 |
|
---|
| 22 | /**
|
---|
| 23 | Uses the specified point to execute the visibility query in all directions.
|
---|
| 24 | @sa ComputeCameraVisibility()
|
---|
| 25 | */
|
---|
[154] | 26 | void ComputeFromPointVisibility(const Vector3 &point,
|
---|
[316] | 27 | GtpVisibility::NodeInfoContainer *visibleNodes,
|
---|
| 28 | GtpVisibility::MeshInfoContainer *visibleGeometry,
|
---|
| 29 | GtpVisibility::PatchInfoContainer *visiblePatches,
|
---|
[154] | 30 | bool relativeVisibility = false);
|
---|
[171] | 31 | |
---|
| 32 | void ComputeCameraVisibility(const Camera &camera, |
---|
[316] | 33 | GtpVisibility::NodeInfoContainer *visibleNodes, |
---|
| 34 | GtpVisibility::MeshInfoContainer *visibleGeometry, |
---|
| 35 | GtpVisibility::PatchInfoContainer *visiblePatches, |
---|
[171] | 36 | bool relativeVisibility = false);
|
---|
| 37 |
|
---|
| 38 | bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false);
|
---|
[133] | 39 |
|
---|
[144] | 40 | /** Sets a viewport for rendering.
|
---|
[133] | 41 | */
|
---|
| 42 | void SetViewport(Viewport *vp);
|
---|
[174] | 43 |
|
---|
[133] | 44 | protected:
|
---|
[171] | 45 |
|
---|
[173] | 46 | void CollectItemBufferResults( |
---|
[316] | 47 | GtpVisibility::MeshInfoContainer *visibleGeometry, |
---|
| 48 | GtpVisibility::PatchInfoContainer *visiblePatches);
|
---|
[173] | 49 |
|
---|
[316] | 50 | void InitItemBuffer(GtpVisibility::MeshInfoContainer *visibleGeometry, |
---|
| 51 | GtpVisibility::PatchInfoContainer *visiblePatches);
|
---|
[171] | 52 |
|
---|
[133] | 53 | Viewport *mViewport;
|
---|
[174] | 54 |
|
---|
[154] | 55 | bool mWasInitialised;
|
---|
[133] | 56 | };
|
---|
| 57 |
|
---|
| 58 | } // namespace Ogre
|
---|
| 59 |
|
---|
| 60 | #endif // PlatformQueryManager
|
---|