Changeset 2123 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Timestamp:
- 02/17/07 22:48:12 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBoundingBoxConverter.h
r2115 r2123 217 217 218 218 // we are only interested in scene entities 219 if (mo->getMovableType() != "Entity") 219 if ((mo->getMovableType() != "Entity") && 220 (mo->getMovableType() != "ManualObject")) 220 221 continue; 221 222 … … 237 238 } 238 239 240 static void AddToObjects(EntityContainer *entites, 241 GtpVisibilityPreprocessor::ObjectContainer &objects, 242 const int id) 243 { 244 // TODO: can actually just put single objects into pvs with same id, 245 // this can be sorted out later!! 246 #if 0 247 EntityContainer::const_iterator eit, eit_end = entryObjects.end(); 248 249 for (eit = entryObjects.begin(); eit != eit_end; ++ eit) 250 { 251 Entity *ent = *eit; 252 253 // warning: multiple ids possible 254 OgreMeshInstance *omi = new OgreMeshInstance(ent); 255 omi->SetId(id); 256 objects.push_back(omi); 257 } 258 259 delete entryObjects; 260 261 #else 262 263 EngineIntersectable *entry = new EngineIntersectable(entites); 264 265 entry->SetId(id); 266 objects.push_back(entry); 267 #endif 268 } 269 239 270 #if USE_KD_PVS 240 271 //------------------------------------------------------------------------- … … 255 286 OgreTypeConverter::ConvertToOgre(pbox); 256 287 257 EntityContainer entryObjects;288 EntityContainer *entryObjects = new EntityContainer(); 258 289 259 290 // find all objects that intersect the bounding box 260 FindIntersectingObjects(box, entryObjects); 261 262 // TODO: can actually just put single objects into pvs with same id, 263 // this can be sorted out later!! 264 #if 1 265 EntityContainer::const_iterator eit, eit_end = entryObjects.end(); 266 267 for (eit = entryObjects.begin(); eit != eit_end; ++ eit) 268 { 269 Entity *ent = *eit; 270 271 // warning: multiple ids possible 272 OgreMeshInstance *omi = new OgreMeshInstance(ent); 273 omi->SetId(id); 274 objects.push_back(omi); 275 } 276 #else 277 EngineIntersectable *entry = 278 new EngineIntersectable(entryObjects); 279 280 entry->SetId(id); 281 objects.push_back(entry); 282 #endif 291 FindIntersectingObjects(box, *entryObjects); 292 293 AddToObjects(entryObjects, objects, id); 283 294 } 284 295 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
r2119 r2123 14 14 #include "ViewCellsManager.h" 15 15 16 17 namespace GtpVisibilityPreprocessor { 18 class Intersectable; 19 } 20 21 class ObjReader; 22 16 23 namespace Ogre { 17 24 … … 24 31 { 25 32 public: 26 OcclusionCullingSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager); 33 OcclusionCullingSceneManager(const String& name, 34 GtpVisibility::VisibilityManager *visManager); 27 35 ~OcclusionCullingSceneManager(); 28 36 … … 70 78 */ 71 79 bool validatePassForRendering(Pass* pass); 80 72 81 #ifdef ITEM_BUFFER 73 82 void RenderItemBuffer(RenderPriorityGroup* pGroup); 74 83 void RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass); 75 84 #endif // ITEM_BUFFER 85 76 86 void _renderQueueGroupObjects(RenderQueueGroup* pGroup, 77 QueuedRenderableCollection::OrganisationMode om); 78 79 /** Override from SceneManager so that sub entities can be assigned an id for item buffer. 87 QueuedRenderableCollection::OrganisationMode om); 88 89 /** Override from SceneManager so that sub entities can be assigned 90 an id for item buffer. 80 91 */ 81 92 Entity* createEntity(const String& entityName, const String& meshName); … … 93 104 void endFrame(); 94 105 95 void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 96 QueuedRenderableCollection::OrganisationMode om); 97 void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup, 98 QueuedRenderableCollection::OrganisationMode om); 106 void renderAdditiveStencilShadowedQueueGroupObjects( 107 RenderQueueGroup* pGroup, 108 QueuedRenderableCollection::OrganisationMode om); 109 void renderModulativeStencilShadowedQueueGroupObjects( 110 RenderQueueGroup* pGroup, 111 QueuedRenderableCollection::OrganisationMode om); 99 112 100 113 /** Override standard function so octree boxes are always of equal side length. … … 113 126 protected: 114 127 128 void MailPvsObjects(); 129 void RenderPvsEntry(GtpVisibilityPreprocessor::Intersectable *obj); 130 void SetObjectVisible(GtpVisibilityPreprocessor::Intersectable *entry, 131 const bool visible); 132 void ShowViewCellsGeometry(); 133 115 134 /** Creates material for depth pass, e.g., a pass that only fills the depth buffer. 116 135 */ … … 254 273 255 274 bool mShowTerrain; 275 276 ObjReader *mObjReader; 256 277 }; 257 278
Note: See TracChangeset
for help on using the changeset viewer.