#ifndef _PlatformQueryManager_H__ #define _PlatformQueryManager_H__ #include "VisibilityInfo.h" #include "QueryManager.h" #include "OgrePlatformHierarchyInterface.h" namespace Ogre { /** Class which implements the QueryManager for Ogre scene queries. */ class __declspec(dllexport) PlatformQueryManager: public GtpVisibility::QueryManager { public: /** Constructor taking a hierarchy interface as an argument. This allows to operate on different hierarchy types, while reusing the implementation of the query methods. */ PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp, int queryModes); /** Uses the specified point to execute the visibility query in all directions. @sa ComputeCameraVisibility() */ void ComputeFromPointVisibility(const Vector3 &point, InfoContainer *visibleNodes, InfoContainer *visibleGeometry, InfoContainer *visiblePatches, bool relativeVisibility = false); void ComputeCameraVisibility(const Camera &camera, InfoContainer *visibleNodes, InfoContainer *visibleGeometry, InfoContainer *visiblePatches, bool relativeVisibility = false); bool ShootRay(const Ray &ray, std::vector *visibleMeshes, bool isGlobalLine = false); /** Sets a viewport for rendering. */ void SetViewport(Viewport *vp); protected: void CollectItemBufferResults( InfoContainer *visibleGeometry, InfoContainer *visiblePatches); void InitItemBuffer(InfoContainer *visibleGeometry, InfoContainer *visiblePatches); Viewport *mViewport; bool mWasInitialised; }; } // namespace Ogre #endif // PlatformQueryManager