Changeset 897 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Timestamp:
- 05/04/06 18:26:23 (19 years ago)
- 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 7 7 #include <OgreOctreeCamera.h> 8 8 #include <OgrePrerequisites.h> 9 9 #include <OgreMovableObject.h> 10 10 #include "OgreOctreeHierarchyInterface.h" 11 11 #include "OgrePlatformQueryManager.h" 12 12 #include "VisibilityManager.h" 13 #include "Containers.h" 13 14 #include "ViewCellsManager.h" 14 15 //class GtpVisibilityPreprocessor::ViewCellsManager;16 17 15 18 16 namespace Ogre { … … 25 23 { 26 24 public: 27 OcclusionCullingSceneManager( GtpVisibility::VisibilityManager *visManager);25 OcclusionCullingSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 28 26 ~OcclusionCullingSceneManager(); 29 27 … … 57 55 Override so we can handle delayed rendering of transparent objects 58 56 */ 59 virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs, 57 virtual void renderObjects(const QueuedRenderableCollection& objs, 58 QueuedRenderableCollection::OrganisationMode om, 60 59 bool doLightIteration, const LightList* manualLightList = 0); 61 60 … … 66 65 /** Override pass so we can do the z-fail pass. 67 66 */ 68 Pass*setPass(Pass* pass);67 const Pass* _setPass(Pass* pass); 69 68 70 69 /** Override from SceneManager so we can skip all but first pass for depth pass. 71 70 */ 72 71 bool validatePassForRendering(Pass* pass); 73 /** This function renders renderables using false color ids. 74 */ 72 #ifdef ITEM_BUFFER 75 73 void RenderItemBuffer(RenderPriorityGroup* pGroup); 76 /** Renders a single object using false color id.77 */78 74 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); 83 78 84 79 /** Override from SceneManager so that sub entities can be assigned an id for item buffer. … … 94 89 OctreeHierarchyInterface *GetHierarchyInterface(); 95 90 96 /** Override this because we must handle shadows differently.91 /** Inherited from scene manager. Neccesary to draw terrain properly. 97 92 */ 98 93 void endFrame(); 99 94 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); 102 99 103 100 /** Override standard function so octree boxes are always of equal side length. 104 101 This has advantages for CHC, because terrain tiles are in different octree nodes 105 102 and can be culled. 103 msz: Modified to reflect changes in Ogre::TerrainSceneManager 106 104 */ 107 v oid setWorldGeometry( const String& filename );105 virtual void setWorldGeometry( DataStreamPtr& stream, const String& typeName ); 108 106 107 109 108 /** Loads view cells for this particular scene. 110 109 */ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h
r726 r897 110 110 /** Deletes all occlusion queries. 111 111 */ 112 void DeleteQueries();112 void ResetQueries(); 113 113 114 114 protected: -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformQueryManager.h
r316 r897 43 43 44 44 protected: 45 45 #ifdef ITEM_BUFFER 46 46 void CollectItemBufferResults( 47 47 GtpVisibility::MeshInfoContainer *visibleGeometry, … … 50 50 void InitItemBuffer(GtpVisibility::MeshInfoContainer *visibleGeometry, 51 51 GtpVisibility::PatchInfoContainer *visiblePatches); 52 #endif // ITEM_BUFFER 52 53 53 54 Viewport *mViewport; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreVisibilityOctreeSceneManager.h
r880 r897 7 7 #include <OgreOctreeCamera.h> 8 8 #include <OgrePrerequisites.h> 9 9 #include <OgreMovableObject.h> 10 10 #include "OgreOctreeHierarchyInterface.h" 11 11 #include "OgrePlatformQueryManager.h" … … 25 25 { 26 26 public: 27 VisibilityOctreeSceneManager( GtpVisibility::VisibilityManager *visManager);27 VisibilityOctreeSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 28 28 ~VisibilityOctreeSceneManager(); 29 29 … … 57 57 Override so we can handle delayed rendering of transparent objects 58 58 */ 59 virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs, 59 virtual void renderObjects(const QueuedRenderableCollection& objs, 60 QueuedRenderableCollection::OrganisationMode om, 60 61 bool doLightIteration, const LightList* manualLightList = 0); 61 62 … … 66 67 /** Override pass so we can do the z-fail pass. 67 68 */ 68 Pass*setPass(Pass* pass);69 const Pass* _setPass(Pass* pass); 69 70 70 71 /** Override from SceneManager so we can skip all but first pass for depth pass. 71 72 */ 72 73 bool validatePassForRendering(Pass* pass); 73 /** This function renders renderables using false color ids. 74 */ 74 #ifdef ITEM_BUFFER 75 75 void RenderItemBuffer(RenderPriorityGroup* pGroup); 76 /** Renders a single object using false color id.77 */78 76 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); 83 79 84 80 /** Override from SceneManager so that sub entities can be assigned an id for item buffer. … … 94 90 OctreeHierarchyInterface *GetHierarchyInterface(); 95 91 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); 100 96 101 97 void loadVisibilityConfig(const String& filename); … … 158 154 bool mRenderNodesContentForViz; 159 155 160 /// if werender transparents after the hierarchical traversal156 /// render transparents after the hierarchical traversal 161 157 bool mDelayRenderTransparents; 162 158 163 /// if weuse 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) 164 160 bool mUseDepthPass; 165 /// if we currently renderingthe depth pass161 /// flag indicating if we currently render the depth pass 166 162 bool mIsDepthPassPhase; 167 163 … … 209 205 }; 210 206 207 /// Factory for VisibilityOctreeSceneManager 208 class VisibilityOctreeSceneManagerFactory : public SceneManagerFactory 209 { 210 protected: 211 void initMetaData(void) const; 212 GtpVisibility::VisibilityManager *visManager; 213 public: 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 211 225 } // namespace Ogre 212 226 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreVisibilitySceneManager.h
r115 r897 18 18 { 19 19 public: 20 VisibilitySceneManager( GtpVisibility::VisibilityManager *visManager);20 VisibilitySceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 21 21 ~VisibilitySceneManager(); 22 22 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreVisibilityTerrainSceneManager.h
r868 r897 22 22 { 23 23 public: 24 VisibilityTerrainSceneManager( GtpVisibility::VisibilityManager *visManager);24 VisibilityTerrainSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 25 25 ~VisibilityTerrainSceneManager(); 26 26 … … 54 54 Override so we can handle delayed rendering of transparent objects 55 55 */ 56 virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs, 56 virtual void renderObjects(const QueuedRenderableCollection& objs, 57 QueuedRenderableCollection::OrganisationMode om, 57 58 bool doLightIteration, const LightList* manualLightList = 0); 58 59 … … 61 62 void WriteLog(); 62 63 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); 67 67 /** Override from SceneManager so we can skip all but first pass for depth pass. 68 68 */ … … 70 70 /** This function renders renderables using false color ids. 71 71 */ 72 #ifdef ITEM_BUFFER 72 73 void RenderItemBuffer(RenderPriorityGroup* pGroup); 73 74 /** Renders a single object using false color id. … … 77 78 scene objects. 78 79 */ 79 void renderQueueGroupObjects(RenderQueueGroup* pGroup); 80 #endif // ITEM_BUFFER 81 void _renderQueueGroupObjects(RenderQueueGroup* pGroup, QueuedRenderableCollection::OrganisationMode om); 80 82 81 83 /** Override from SceneManager so that sub entities can be assigned an id for item buffer. … … 97 99 /** Override this because we must handle shadows differently. 98 100 */ 99 void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup); 101 void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 102 QueuedRenderableCollection::OrganisationMode om); 100 103 /** Override this because we must handle shadows differently. 101 104 */ 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 nodes106 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 ); 109 112 110 113 protected: … … 178 181 }; 179 182 183 /// Factory for VisibilityTerrainSceneManager 184 class VisibilityTerrainSceneManagerFactory : public SceneManagerFactory 185 { 186 protected: 187 typedef std::vector<TerrainPageSource*> TerrainPageSources; 188 TerrainPageSources mTerrainPageSources; 189 void initMetaData(void) const; 190 GtpVisibility::VisibilityManager *visManager; 191 public: 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 180 200 } // namespace Ogre 181 201
Note: See TracChangeset
for help on using the changeset viewer.