Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h	(revision 2332)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h	(revision 2455)
@@ -26,4 +26,5 @@
 {
 public:
+
 	/** Construction taking the current scene manager and the 
 		current rendersystem as argument
@@ -33,5 +34,4 @@
 	PlatformHierarchyInterface(SceneManager *sm, RenderSystem *rsys);
 	~PlatformHierarchyInterface();
-		
 	/** Returns next available occlusion query or creates new one.
 		@return the next occlusion query
@@ -76,9 +76,10 @@
 	/** Issue a occlusion query for this node. 
 		@param node the current hierarchy node
-		@param wasVisible if the node was visible in the last frame
+		@param gives a parameters that decideds on the type of occlusion query.
+		
 		@returns occlusion query for this node
 	*/
 	GtpVisibility::OcclusionQuery *IssueNodeOcclusionQuery(
-		GtpVisibility::HierarchyNode *node, const bool wasVisible);
+		GtpVisibility::HierarchyNode *node, const bool testGeometry = false);
 
 	/** Issue a occlusion query for this mesh.
@@ -87,5 +88,4 @@
 	*/
 	GtpVisibility::OcclusionQuery *IssueMeshOcclusionQuery(GtpVisibility::Mesh *mesh);
-
 	/** If true, the interface finds and renders only objects which are marked as shadow casters.
 		@remark This is important for the shadow texture pass
@@ -95,21 +95,16 @@
 	*/
 	bool GetOnlyShadowCasters();
-	/** see set 
-	*/
-	bool GetTestGeometryForVisibleLeaves();
 	/** see set
 	*/
 	SceneManager *GetSceneManager();
-
 	/** see set 
 	*/
 	RenderSystem *GetRenderSystem();
-	
 	/** true if bounding box query is currently active. 
 	*/
     bool IsBoundingBoxQuery();
-
+	/** Issues occlusion queries for a patch.
+	*/
 	GtpVisibility::OcclusionQuery *IssuePatchOcclusionQuery(GtpVisibility::Patch *patch);
-
 	/** Deletes all occlusion queries.
 	*/
@@ -126,9 +121,22 @@
 
 	void PullUpLastVisited(GtpVisibility::HierarchyNode *node, const int frameId) const {}
-	void DetermineVisibilityRatio(GtpVisibility::HierarchyNode *node) const {}
 
-	float GetNodeVisibilityRatio(GtpVisibility::HierarchyNode *node) const { return 1.0f;}
+	GtpVisibility::HierarchyNode *GetParent(GtpVisibility::HierarchyNode *node) { return NULL; }
 
-	GtpVisibility::HierarchyNode *GetParent(GtpVisibility::HierarchyNode *node) { return NULL;}
+	/** Returns #frames this node is assumed to be visible.
+	*/
+	virtual int GetNodeAssumedVisible(GtpVisibility::HierarchyNode *node) { return 0; };
+	/** Sets #frames this node is assumed to be visible.
+	*/
+	virtual void SetNodeAssumedVisible(GtpVisibility::HierarchyNode *node, int assumedVisible) {};
+	/** Decreases #frames this node is assumed to be visible.
+	*/
+	virtual void DecNodeAssumedVisible(GtpVisibility::HierarchyNode *node) {};
+	/** Test tigher geometry bounds instead of hierarchy node.
+	*/
+	void SetTestGeometryBounds(bool testGeometryForLeaves);
+	/** See get
+	*/
+	int GetTestGeometryBounds();
 
 
@@ -138,26 +146,24 @@
 	*/
 	void RenderGeometry(GtpVisibility::Mesh *geom);
-	
 	/** Renders the given patch 
 	*/
 	void RenderPatch(GtpVisibility::Patch *patch);
-
 	/** Materials for visualizing frustum and query culled nodes.
 	*/
 	void CreateNodeVizMaterials();
-
 	/** Returns pointer to current renderable bounding box geometry.
 	*/
 	SolidBoundingBox *GetSolidBoundingBox();
-
-	/** A pass that prepares an occlusion query.
-		@remark disables depth write, colour write, lighting,
-		vertex and fragment program.*/
-	//void SetOcclusionPass();
-
 	/** Renders given bounding box.
 		@param box the bounding box of the scene node to be rendered 
 	*/
 	void RenderBoundingBox(AxisAlignedBox *box);
+	/** Renders bounding boxes of the geometry.
+		@param node the node to be rendered
+	*/
+	virtual void RenderGeometryBounds(GtpVisibility::HierarchyNode *node) {};
+	
+
+	/////////////////////
 
 	/** Renderable of an aabb.
@@ -179,4 +185,6 @@
 	int mLeavePassesInQueue;
 	bool mIsBoundingBoxQuery;
+
+	bool mTestGeometryBounds;
 };
 
