Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h	(revision 2119)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h	(revision 2123)
@@ -14,4 +14,11 @@
 #include "ViewCellsManager.h"
 
+
+namespace GtpVisibilityPreprocessor {
+class Intersectable;
+}
+
+class ObjReader;
+
 namespace Ogre {
 
@@ -24,5 +31,6 @@
 {
 public:
-	OcclusionCullingSceneManager(const String& name, GtpVisibility::VisibilityManager *visManager);
+	OcclusionCullingSceneManager(const String& name, 
+								 GtpVisibility::VisibilityManager *visManager);
 	~OcclusionCullingSceneManager();
 
@@ -70,12 +78,15 @@
 	*/
 	bool validatePassForRendering(Pass* pass);
+
 #ifdef ITEM_BUFFER
 	void RenderItemBuffer(RenderPriorityGroup* pGroup);
 	void RenderSingleObjectForItemBuffer(Renderable *rend, Pass *pass);
 #endif // ITEM_BUFFER
+
 	void _renderQueueGroupObjects(RenderQueueGroup* pGroup,
-		QueuedRenderableCollection::OrganisationMode om);
-
-	/** Override from SceneManager so that sub entities can be assigned an id for item buffer.
+								  QueuedRenderableCollection::OrganisationMode om);
+
+	/** Override from SceneManager so that sub entities can be assigned 
+		an id for item buffer.
 	*/
 	Entity* createEntity(const String& entityName, const String& meshName);
@@ -93,8 +104,10 @@
 	void endFrame();
 
-	void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup,
-		QueuedRenderableCollection::OrganisationMode om);
-	void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup,
-		QueuedRenderableCollection::OrganisationMode om);
+	void renderAdditiveStencilShadowedQueueGroupObjects(
+				RenderQueueGroup* pGroup,
+				QueuedRenderableCollection::OrganisationMode om);
+	void renderModulativeStencilShadowedQueueGroupObjects(
+				RenderQueueGroup* pGroup,
+				QueuedRenderableCollection::OrganisationMode om);
 	
 	/** Override standard function so octree boxes are always of equal side length.
@@ -113,4 +126,10 @@
 protected:
 	
+	void MailPvsObjects();
+	void RenderPvsEntry(GtpVisibilityPreprocessor::Intersectable *obj);
+	void SetObjectVisible(GtpVisibilityPreprocessor::Intersectable *entry, 
+						  const bool visible);
+	void ShowViewCellsGeometry();
+
 	/** Creates material for depth pass, e.g., a pass that only fills the depth buffer. 
 	*/
@@ -254,4 +273,6 @@
 
 	bool mShowTerrain;
+
+	ObjReader *mObjReader;
 };
 
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBoundingBoxConverter.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBoundingBoxConverter.h	(revision 2115)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBoundingBoxConverter.h	(revision 2123)
@@ -217,5 +217,6 @@
 
 			// we are only interested in scene entities
-			if (mo->getMovableType() != "Entity")
+			if ((mo->getMovableType() != "Entity") &&
+				(mo->getMovableType() != "ManualObject"))
 				continue;
 			
@@ -237,4 +238,34 @@
 }
 
+static void AddToObjects(EntityContainer *entites, 
+						 GtpVisibilityPreprocessor::ObjectContainer &objects,
+						 const int id)
+{
+	// TODO: can actually just put single objects into pvs with same id, 
+	// this can be sorted out later!!
+#if 0
+	EntityContainer::const_iterator eit, eit_end = entryObjects.end();
+
+	for (eit = entryObjects.begin(); eit != eit_end; ++ eit)
+	{
+		Entity *ent = *eit;
+
+        // warning: multiple ids possible
+		OgreMeshInstance *omi = new OgreMeshInstance(ent);
+		omi->SetId(id);
+		objects.push_back(omi);
+	}
+
+	delete entryObjects;
+
+#else
+
+	EngineIntersectable *entry = new EngineIntersectable(entites);
+
+	entry->SetId(id);
+	objects.push_back(entry);
+#endif
+}
+
 #if USE_KD_PVS
 //-------------------------------------------------------------------------
@@ -255,30 +286,10 @@
 			OgreTypeConverter::ConvertToOgre(pbox);
 		
-		EntityContainer entryObjects;
+		EntityContainer *entryObjects = new EntityContainer();
 
 		// find all objects that intersect the bounding box
-		FindIntersectingObjects(box, entryObjects);
-
-		// TODO: can actually just put single objects into pvs with same id, 
-		// this can be sorted out later!!
-#if 1
-		EntityContainer::const_iterator eit, eit_end = entryObjects.end();
-
-		for (eit = entryObjects.begin(); eit != eit_end; ++ eit)
-		{
-			Entity *ent = *eit;
-
-            // warning: multiple ids possible
-			OgreMeshInstance *omi = new OgreMeshInstance(ent);
-			omi->SetId(id);
-			objects.push_back(omi);
-		}
-#else
-		EngineIntersectable *entry = 
-			new EngineIntersectable(entryObjects);
-
-		entry->SetId(id);
-		objects.push_back(entry);
-#endif
+		FindIntersectingObjects(box, *entryObjects);
+
+		AddToObjects(entryObjects, objects, id);
 	}
 
