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

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

fixed visibilityQueries

RevLine 
[133]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
[171]17            on different hierarchy types, while reusing the implementation of the query methods.
[133]18    */
[171]19        PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface,
20                                 Viewport *vp,
21                                                 bool renderPatches);
[133]22   
23    /**
24        Uses the specified point to execute the visibility query in all directions.
25        @sa ComputeCameraVisibility()
26    */
[154]27    void ComputeFromPointVisibility(const Vector3 &point,
[133]28                               InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
29                               InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
[159]30                                   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
[154]31                               bool relativeVisibility = false);
[171]32 
33        void ComputeCameraVisibility(const Camera &camera,
34                               InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
35                               InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
36                                   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
37                               bool relativeVisibility = false);
38 
39        bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false); 
[133]40
[144]41        /** Sets a viewport for rendering.
[133]42        */
43        void SetViewport(Viewport *vp);
44       
45protected:
[171]46
47        void InitItemBuffer(InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
48                                                InfoContainer<GtpVisibility::PatchInfo> *visiblePatches);
49
[133]50        Viewport *mViewport;
[154]51        bool mWasInitialised;
[171]52        bool mRenderPatches;
[133]53};
54
55} // namespace Ogre
56
57#endif // PlatformQueryManager
Note: See TracBrowser for help on using the repository browser.