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

Revision 154, 1.8 KB checked in by mattausch, 19 years ago (diff)

added item buffer queries.

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        onm different hierarchy types, while reusing the implementation of the query methods.
18    */
19        PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, Viewport *vp);
20   
21    /**
22        Uses the specified point to execute the visibility query in all directions.
23        @sa ComputeCameraVisibility()
24    */
25    void ComputeFromPointVisibility(const Vector3 &point,
26                               InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
27                               InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
28                               bool relativeVisibility = false);
29   
30  /**
31      Ray shooting interface: finds an intersection with objects in the scene.
32
33      @param ray The given input ray (assuming the ray direction is normalized)
34
35      @param visibleMeshes List of meshes intersecting the ray
36
37      @param isGlobalLine If false only first intersection with opaque object is returned.
38      Otherwise all intersections of the ray with the scene are found.
39
40      @return true if there is any intersection.
41        */
42    virtual bool
43    ShootRay(const Ray &ray,
44             std::vector<Mesh *> *visibleMeshes,
45             bool isGlobalLine = false
46             ); 
47
48        /** Sets a viewport for rendering.
49        */
50        void SetViewport(Viewport *vp);
51       
52protected:
53        Viewport *mViewport;
54        bool mWasInitialised;
55};
56
57} // namespace Ogre
58
59#endif // PlatformQueryManager
Note: See TracBrowser for help on using the repository browser.