Ignore:
Timestamp:
05/04/06 18:26:23 (19 years ago)
Author:
mattausch
Message:

updated to ogre 1.2

Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h

    r868 r897  
    77#include <OgreOctreeCamera.h> 
    88#include <OgrePrerequisites.h> 
    9  
     9#include <OgreMovableObject.h> 
    1010#include "OgreOctreeHierarchyInterface.h" 
    1111#include "OgrePlatformQueryManager.h" 
    1212#include "VisibilityManager.h" 
     13#include "Containers.h" 
    1314#include "ViewCellsManager.h" 
    14  
    15 //class GtpVisibilityPreprocessor::ViewCellsManager; 
    16  
    1715 
    1816namespace Ogre { 
     
    2523{ 
    2624public: 
    27         OcclusionCullingSceneManager(GtpVisibility::VisibilityManager *visManager); 
     25        OcclusionCullingSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 
    2826        ~OcclusionCullingSceneManager(); 
    2927 
     
    5755                Override so we can handle delayed rendering of transparent objects 
    5856        */ 
    59         virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,  
     57        virtual void renderObjects(const QueuedRenderableCollection& objs,  
     58                        QueuedRenderableCollection::OrganisationMode om,  
    6059            bool doLightIteration, const LightList* manualLightList = 0); 
    6160 
     
    6665        /** Override pass so we can do the z-fail pass.  
    6766        */ 
    68         Pass* setPass(Pass* pass); 
     67        const Pass* _setPass(Pass* pass); 
    6968 
    7069        /** Override from SceneManager so we can skip all but first pass for depth pass.  
    7170        */ 
    7271        bool validatePassForRendering(Pass* pass); 
    73         /** This function renders renderables using false color ids. 
    74         */ 
     72#ifdef ITEM_BUFFER 
    7573        void RenderItemBuffer(RenderPriorityGroup* pGroup); 
    76         /** Renders a single object using false color id. 
    77         */ 
    7874        void RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass); 
    79         /** Overritten from scene manager to include the false color id rendering of the 
    80                 scene objects. 
    81         */ 
    82         void renderQueueGroupObjects(RenderQueueGroup* pGroup); 
     75#endif // ITEM_BUFFER 
     76        void _renderQueueGroupObjects(RenderQueueGroup* pGroup, 
     77                QueuedRenderableCollection::OrganisationMode om); 
    8378 
    8479        /** Override from SceneManager so that sub entities can be assigned an id for item buffer. 
     
    9489        OctreeHierarchyInterface *GetHierarchyInterface(); 
    9590 
    96         /** Override this because we must handle shadows differently. 
     91        /** Inherited from scene manager. Neccesary to draw terrain properly. 
    9792        */ 
    9893        void endFrame(); 
    9994 
    100         void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 
    101         void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 
     95        void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 
     96                QueuedRenderableCollection::OrganisationMode om); 
     97        void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 
     98                QueuedRenderableCollection::OrganisationMode om); 
    10299 
    103100        /** Override standard function so octree boxes are always of equal side length. 
    104101                This has advantages for CHC, because terrain tiles are in different octree nodes 
    105102                and can be culled. 
     103                msz: Modified to reflect changes in Ogre::TerrainSceneManager 
    106104        */ 
    107         void setWorldGeometry( const String& filename ); 
     105        virtual void setWorldGeometry( DataStreamPtr& stream, const String& typeName ); 
    108106 
     107         
    109108        /** Loads view cells for this particular scene. 
    110109        */ 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h

    r726 r897  
    110110        /** Deletes all occlusion queries. 
    111111        */ 
    112         void DeleteQueries(); 
     112        void ResetQueries(); 
    113113 
    114114protected: 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformQueryManager.h

    r316 r897  
    4343 
    4444protected: 
    45  
     45#ifdef ITEM_BUFFER 
    4646        void CollectItemBufferResults( 
    4747                                GtpVisibility::MeshInfoContainer *visibleGeometry, 
     
    5050        void InitItemBuffer(GtpVisibility::MeshInfoContainer *visibleGeometry, 
    5151                                                GtpVisibility::PatchInfoContainer *visiblePatches); 
     52#endif // ITEM_BUFFER 
    5253 
    5354        Viewport *mViewport; 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreVisibilityOctreeSceneManager.h

    r880 r897  
    77#include <OgreOctreeCamera.h> 
    88#include <OgrePrerequisites.h> 
    9  
     9#include <OgreMovableObject.h> 
    1010#include "OgreOctreeHierarchyInterface.h" 
    1111#include "OgrePlatformQueryManager.h" 
     
    2525{ 
    2626public: 
    27         VisibilityOctreeSceneManager(GtpVisibility::VisibilityManager *visManager); 
     27        VisibilityOctreeSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 
    2828        ~VisibilityOctreeSceneManager(); 
    2929 
     
    5757                Override so we can handle delayed rendering of transparent objects 
    5858        */ 
    59         virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,  
     59        virtual void renderObjects(const QueuedRenderableCollection& objs,  
     60                        QueuedRenderableCollection::OrganisationMode om,  
    6061            bool doLightIteration, const LightList* manualLightList = 0); 
    6162 
     
    6667        /** Override pass so we can do the z-fail pass.  
    6768        */ 
    68         Pass* setPass(Pass* pass); 
     69        const Pass* _setPass(Pass* pass); 
    6970 
    7071        /** Override from SceneManager so we can skip all but first pass for depth pass.  
    7172        */ 
    7273        bool validatePassForRendering(Pass* pass); 
    73         /** This function renders renderables using false color ids. 
    74         */ 
     74#ifdef ITEM_BUFFER 
    7575        void RenderItemBuffer(RenderPriorityGroup* pGroup); 
    76         /** Renders a single object using false color id. 
    77         */ 
    7876        void RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass); 
    79         /** Overritten from scene manager to include the false color id rendering of the 
    80                 scene objects. 
    81         */ 
    82         void renderQueueGroupObjects(RenderQueueGroup* pGroup); 
     77#endif // ITEM_BUFFER 
     78        void _renderQueueGroupObjects(RenderQueueGroup* pGroup, QueuedRenderableCollection::OrganisationMode om); 
    8379 
    8480        /** Override from SceneManager so that sub entities can be assigned an id for item buffer. 
     
    9490        OctreeHierarchyInterface *GetHierarchyInterface(); 
    9591 
    96         void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 
    97         /** Override this because we must handle shadows differently. 
    98         */ 
    99         void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 
     92        void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup,  
     93                QueuedRenderableCollection::OrganisationMode om); 
     94        void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 
     95                QueuedRenderableCollection::OrganisationMode om); 
    10096 
    10197        void loadVisibilityConfig(const String& filename); 
     
    158154        bool mRenderNodesContentForViz; 
    159155 
    160         /// if we render transparents after the hierarchical traversal 
     156        /// render transparents after the hierarchical traversal 
    161157        bool mDelayRenderTransparents; 
    162158 
    163         /// if we use a depth pass (i.e., fill only the depth buffer in the first pass) 
     159        /// use a depth pass (i.e., fill only the depth buffer in the first pass) 
    164160        bool mUseDepthPass; 
    165         /// if we currently rendering the depth pass 
     161        /// flag indicating if we currently render the depth pass 
    166162        bool mIsDepthPassPhase; 
    167163 
     
    209205}; 
    210206 
     207/// Factory for VisibilityOctreeSceneManager 
     208class VisibilityOctreeSceneManagerFactory : public SceneManagerFactory 
     209{ 
     210protected: 
     211        void initMetaData(void) const; 
     212        GtpVisibility::VisibilityManager *visManager; 
     213public: 
     214        VisibilityOctreeSceneManagerFactory(GtpVisibility::VisibilityManager *vm) 
     215        { 
     216                visManager = vm; 
     217        } 
     218        ~VisibilityOctreeSceneManagerFactory() {} 
     219        /// Factory type name 
     220        static const String FACTORY_TYPE_NAME; 
     221        SceneManager* createInstance(const String& instanceName); 
     222        void destroyInstance(SceneManager* instance); 
     223}; 
     224 
    211225} // namespace Ogre 
    212226 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreVisibilitySceneManager.h

    r115 r897  
    1818{ 
    1919public: 
    20         VisibilitySceneManager(GtpVisibility::VisibilityManager *visManager); 
     20        VisibilitySceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 
    2121        ~VisibilitySceneManager(); 
    2222 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreVisibilityTerrainSceneManager.h

    r868 r897  
    2222{ 
    2323public: 
    24         VisibilityTerrainSceneManager(GtpVisibility::VisibilityManager *visManager); 
     24        VisibilityTerrainSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 
    2525        ~VisibilityTerrainSceneManager(); 
    2626 
     
    5454                Override so we can handle delayed rendering of transparent objects 
    5555        */ 
    56         virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,  
     56        virtual void renderObjects(const QueuedRenderableCollection& objs,  
     57                        QueuedRenderableCollection::OrganisationMode om,  
    5758            bool doLightIteration, const LightList* manualLightList = 0); 
    5859 
     
    6162        void WriteLog(); 
    6263 
    63         /** Override pass so we can do the z-fail pass.  
    64         */ 
    65         Pass* setPass(Pass* pass); 
    66  
     64        /** We override this because we want to include the z-fail pass.  
     65        */ 
     66        const Pass* _setPass(Pass* pass); 
    6767        /** Override from SceneManager so we can skip all but first pass for depth pass.  
    6868        */ 
     
    7070        /** This function renders renderables using false color ids. 
    7171        */ 
     72#ifdef ITEM_BUFFER 
    7273        void RenderItemBuffer(RenderPriorityGroup* pGroup); 
    7374        /** Renders a single object using false color id. 
     
    7778                scene objects. 
    7879        */ 
    79         void renderQueueGroupObjects(RenderQueueGroup* pGroup); 
     80#endif // ITEM_BUFFER 
     81        void _renderQueueGroupObjects(RenderQueueGroup* pGroup, QueuedRenderableCollection::OrganisationMode om); 
    8082 
    8183        /** Override from SceneManager so that sub entities can be assigned an id for item buffer. 
     
    9799        /** Override this because we must handle shadows differently. 
    98100        */ 
    99         void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 
     101        void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 
     102                QueuedRenderableCollection::OrganisationMode om); 
    100103        /** Override this because we must handle shadows differently. 
    101104        */ 
    102         void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 
    103  
    104         /** Override standard function so octree boxes are always of equal side length. 
    105                 This has advantages for CHC, because terrain tiles are in different octree nodes 
    106                 and can be culled. 
    107         */ 
    108         void setWorldGeometry(const String& filename); 
     105        void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup,  
     106                QueuedRenderableCollection::OrganisationMode om); 
     107/// @copydoc SceneManager::getTypeName 
     108        const String& getTypeName(void) const; 
     109        static const String FACTORY_TYPE_NAME; 
     110 
     111        void setWorldGeometry( DataStreamPtr& stream, const String& typeName ); 
    109112 
    110113protected: 
     
    178181}; 
    179182 
     183/// Factory for VisibilityTerrainSceneManager 
     184class VisibilityTerrainSceneManagerFactory : public SceneManagerFactory 
     185{ 
     186protected: 
     187        typedef std::vector<TerrainPageSource*> TerrainPageSources; 
     188        TerrainPageSources mTerrainPageSources; 
     189        void initMetaData(void) const; 
     190        GtpVisibility::VisibilityManager *visManager; 
     191public: 
     192        VisibilityTerrainSceneManagerFactory(GtpVisibility::VisibilityManager *vm); 
     193        ~VisibilityTerrainSceneManagerFactory(); 
     194        /// Factory type name 
     195        static const String FACTORY_TYPE_NAME; 
     196        SceneManager* createInstance(const String& instanceName); 
     197        void destroyInstance(SceneManager* instance); 
     198}; 
     199 
    180200} // namespace Ogre 
    181201 
Note: See TracChangeset for help on using the changeset viewer.