OgrePlatformHierarchyInterface.h

Go to the documentation of this file.
00001 #ifndef _PlatformHierarchyInterface_H__
00002 #define _PlatformHierarchyInterface_H__
00003 
00004 #include <OgreSceneManager.h>
00005 #include <OgrePrerequisites.h>
00006 #include <OgreCamera.h>
00007 #include <OgreRenderSystem.h>
00008 
00009 #include "OgreSolidHalfBoundingBox.h"
00010 #include "HierarchyInterface.h"
00011 #include "OgrePlatformOcclusionQuery.h"
00012 
00013 namespace Ogre {
00014 
00019 class PlatformHierarchyInterface: public GtpVisibility::HierarchyInterface
00020 {
00021 public:
00026         PlatformHierarchyInterface(SceneManager *sm, RenderSystem *rsys);
00027         ~PlatformHierarchyInterface();
00028                 
00032         GtpVisibility::OcclusionQuery *GetNextOcclusionQuery();
00033                 
00037         void SetCamera(Camera *cam);
00038                 
00045         void InitFrame(GtpVisibility::HierarchyNode *root, Ogre::Camera *cam);
00050         bool CheckFrustumVisible(GtpVisibility::HierarchyNode *node, bool &intersects);
00054         void SetSceneManager(SceneManager *sm);
00058         void SetRenderSystem(RenderSystem *rsys);
00063         virtual AxisAlignedBox *GetBoundingBox(GtpVisibility::HierarchyNode *node) = 0;
00068         GtpVisibility::OcclusionQuery *IssueOcclusionQuery(GtpVisibility::HierarchyNode *node);
00069 
00070 protected:
00073         void DeleteQueries();
00077         void RenderBoundingBox(AxisAlignedBox *box);
00081         SolidHalfBoundingBox *GetSolidHalfBoundingBox(int half);
00082 
00085         SolidHalfBoundingBox *mHalfBoundingBox[2];      
00086 
00087         SceneManager *mSceneManager;
00088         RenderSystem *mRenderSystem;
00089 
00090         Camera *mCamera;
00091         AxisAlignedBox mBox;
00092 
00093         std::vector<PlatformOcclusionQuery *> mOcclusionQueries;
00094 };
00095 
00096 } // namespace Ogre
00097 
00098 #endif // PlatformHierarchyInterface_H

Generated on Fri Apr 29 19:47:56 2005 for GameTools Visibility Modules by  doxygen 1.4.2