#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 onm different hierarchy types, while reusing the implementation of the query methods. */ PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp); /** Uses the specified point to execute the visibility query in all directions. @sa ComputeCameraVisibility() */ void ComputeFromPointVisibility(const Vector3 &point, InfoContainer *visibleNodes, InfoContainer *visibleGeometry, bool relativeVisibility = false); /** Ray shooting interface: finds an intersection with objects in the scene. @param ray The given input ray (assuming the ray direction is normalized) @param visibleMeshes List of meshes intersecting the ray @param isGlobalLine If false only first intersection with opaque object is returned. Otherwise all intersections of the ray with the scene are found. @return true if there is any intersection. */ virtual bool ShootRay(const Ray &ray, std::vector *visibleMeshes, bool isGlobalLine = false ); /** Sets a viewport for rendering. */ void SetViewport(Viewport *vp); protected: Viewport *mViewport; bool mWasInitialised; }; } // namespace Ogre #endif // PlatformQueryManager