Index: trunk/VUT/work/TestCullingTerrain/TerrainContentGenerator.cpp
===================================================================
--- trunk/VUT/work/TestCullingTerrain/TerrainContentGenerator.cpp	(revision 85)
+++ trunk/VUT/work/TestCullingTerrain/TerrainContentGenerator.cpp	(revision 87)
@@ -50,5 +50,5 @@
 //-----------------------------------------------------------------------
 TerrainContentGenerator::TerrainContentGenerator(SceneManager *sm):
-SceneContentGenerator(sm), mMaxHeight(100)
+SceneContentGenerator(sm), mMaxHeight(50)
 {
 	mMinPos = Vector3(0.0f, 5000.0f, 0.0f);
Index: trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
===================================================================
--- trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp	(revision 86)
+++ trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp	(revision 87)
@@ -96,7 +96,6 @@
 
 	mTerrainContentGenerator = new TerrainContentGenerator(mSceneMgr);
-	
-	mTerrainContentGenerator->GenerateScene(500, "ninja.mesh");
-	mTerrainContentGenerator->GenerateScene(500, "robot.mesh");
+//	mTerrainContentGenerator->GenerateScene(500, "ninja.mesh");
+	mTerrainContentGenerator->GenerateScene(1000, "robot.mesh");
 
 	// no limitations needed anymore: the user can set 
@@ -150,5 +149,7 @@
 mTerrainContentGenerator(sceneGenerator),
 mVisibilityThreshold(0),
-mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING)
+mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING),
+mShowOctree(true),
+mUseCulling(false)
 {
 	// Reduce move speed
@@ -174,7 +175,8 @@
 	mHierarchyNodesInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/HierarchyNodesInfo");
 	mRenderedNodesInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/RenderedNodesInfo");
-	mNumObjectsInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/NumObjectsInfo");
+	mObjectsInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/ObjectsInfo");
 	mUseOptimizationInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/UseOptimizationInfo");
-
+	mQueriesIssuedInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/QueriesIssuedInfo");
+	
 	mAlgorithmInfo->setCaption(": " + mCurrentAlgorithmCaptions[mCurrentAlgorithm]);
 	mThresholdInfo->setCaption(": 0");
@@ -184,10 +186,12 @@
 	mHierarchyNodesInfo->setCaption(": 0");
 	mRenderedNodesInfo->setCaption(": 0");
-	mNumObjectsInfo->setCaption(": 0");
+	mObjectsInfo->setCaption(": 0");
 	mUseOptimizationInfo->setCaption(": true");
+	mQueriesIssuedInfo->setCaption(": 0");
 
 	setAlgorithm(mCurrentAlgorithm);
 	toggleUseOptimization();
 	toggleShowOctree();
+	toggleUseCulling();
 
     pOver->show();
@@ -301,7 +305,7 @@
 	KEY_PRESSED(KC_O, 0.3, toggleUseOptimization());
 	KEY_PRESSED(KC_S, 0.3, toggleShowOctree());
-	//KEY_PRESSED(KC_T, 1, change);
-      
-	changeStats();
+	KEY_PRESSED(KC_C, 0.3, toggleUseCulling());
+	      
+	updateStats();
 
     return ExampleFrameListener::frameStarted(evt) && ExampleFrameListener::frameEnded(evt);        
@@ -329,10 +333,9 @@
 void MouseQueryListener::setAlgorithm(int algorithm)
 {
-	//OutputDebugString("changing algorithm\n");
 	mAlgorithmInfo->setCaption(": " + mCurrentAlgorithmCaptions[mCurrentAlgorithm]);
 	mSceneMgr->setOption("Algorithm", &mCurrentAlgorithm);
 }
 //-----------------------------------------------------------------------
-void MouseQueryListener::changeStats()
+void MouseQueryListener::updateStats()
 {
 	unsigned int opt = 0;
@@ -342,4 +345,7 @@
 	mFrustumCulledNodesInfo->setCaption(str);
 	
+	mSceneMgr->getOption("NumQueriesIssued", &opt); sprintf(str,": %d", opt); 
+	mQueriesIssuedInfo->setCaption(str);
+	
 	mSceneMgr->getOption("NumQueryCulledNodes", &opt); sprintf(str,": %d", opt); 
 	mQueryCulledNodesInfo->setCaption(str);
@@ -355,5 +361,5 @@
 
 	sprintf(str,": %d", mTerrainContentGenerator->GetObjectCount()); 
-	mNumObjectsInfo->setCaption(str);
+	mObjectsInfo->setCaption(str);
 }
 //-----------------------------------------------------------------------
@@ -375,4 +381,11 @@
 
 	mSceneMgr->setOption("ShowOctree", &mShowOctree);
+}
+//-----------------------------------------------------------------------
+void MouseQueryListener::toggleUseCulling()
+{
+	mUseCulling = !mUseCulling;
+
+	mSceneMgr->setOption("UseCulling", &mUseCulling);
 }
 //-----------------------------------------------------------------------
Index: trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h
===================================================================
--- trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h	(revision 86)
+++ trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h	(revision 87)
@@ -62,7 +62,8 @@
 	void setAlgorithm(int algorithm);
 	void changeThreshold(int incr);
-	void changeStats();
+	void updateStats();
 	void toggleUseOptimization();
 	void toggleShowOctree();
+	void toggleUseCulling();
 
 protected:
@@ -84,5 +85,6 @@
 	OverlayElement *mUseOptimizationInfo;
 	OverlayElement *mRenderedNodesInfo;
-	OverlayElement *mNumObjectsInfo;
+	OverlayElement *mObjectsInfo;
+	OverlayElement *mQueriesIssuedInfo;
 
 	SceneNode *mCurrentObject;         // The newly created object
@@ -94,4 +96,5 @@
 	bool mUseOptimization;
 	bool mShowOctree;
+	bool mUseCulling;
 };
 
Index: trunk/VUT/work/TestCulling/SceneContentGenerator.cpp
===================================================================
--- trunk/VUT/work/TestCulling/SceneContentGenerator.cpp	(revision 86)
+++ trunk/VUT/work/TestCulling/SceneContentGenerator.cpp	(revision 87)
@@ -21,5 +21,5 @@
 mMinAngle(Vector3(0.0f, 0.0f, 0.0f)),
 mMaxAngle(Vector3(360, 360, 360)),
-mScale(0.05, 0.05, 0.05)
+mScale(0.1, 0.1, 0.1)
 {
 }
Index: trunk/VUT/work/TestCulling/TestCullingApplication.cpp
===================================================================
--- trunk/VUT/work/TestCulling/TestCullingApplication.cpp	(revision 86)
+++ trunk/VUT/work/TestCulling/TestCullingApplication.cpp	(revision 87)
@@ -110,5 +110,7 @@
 mSceneContentGenerator(sceneContentGenerator),
 mVisibilityThreshold(0),
-mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING)
+mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING),
+mShowOctree(true),
+mUseCulling(false)
 {
     // Reduce move speed
@@ -132,6 +134,7 @@
 	mHierarchyNodesInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/HierarchyNodesInfo");
 	mRenderedNodesInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/RenderedNodesInfo");
-	mNumObjectsInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/NumObjectsInfo");
+	mObjectsInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/ObjectsInfo");
 	mUseOptimizationInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/UseOptimizationInfo");
+	mQueriesIssuedInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/QueriesIssuedInfo");
 
 	mAlgorithmInfo->setCaption(": " + mCurrentAlgorithmCaptions[mCurrentAlgorithm]);
@@ -142,6 +145,7 @@
 	mHierarchyNodesInfo->setCaption(": 0");
 	mRenderedNodesInfo->setCaption(": 0");
-	mNumObjectsInfo->setCaption(": 0");
+	mObjectsInfo->setCaption(": 0");
 	mUseOptimizationInfo->setCaption(": true");
+	mQueriesIssuedInfo->setCaption(": 0");
 
 	setAlgorithm(mCurrentAlgorithm);
@@ -226,7 +230,7 @@
 	KEY_PRESSED(KC_ADD, 0, changeThreshold(10));
 	KEY_PRESSED(KC_O, 0.3, toggleUseOptimization());
-	//KEY_PRESSED(KC_T, 1, change);
-      
-	changeStats();
+	KEY_PRESSED(KC_C, 0.3, toggleUseCulling());
+	      
+	updateStats();
 
     return ExampleFrameListener::frameStarted(evt) && ExampleFrameListener::frameEnded(evt);        
@@ -271,4 +275,11 @@
 }
 //-----------------------------------------------------------------------
+void MouseQueryListener::toggleUseCulling()
+{
+	mUseCulling = !mUseCulling;
+
+	mSceneMgr->setOption("UseCulling", &mUseCulling);
+}
+//-----------------------------------------------------------------------
 void MouseQueryListener::setAlgorithm(int algorithm)
 {
@@ -277,5 +288,5 @@
 }
 //-----------------------------------------------------------------------
-void MouseQueryListener::changeStats()
+void MouseQueryListener::updateStats()
 {
 	unsigned int opt = 0;
@@ -285,4 +296,7 @@
 	mFrustumCulledNodesInfo->setCaption(str);
 	
+	mSceneMgr->getOption("NumQueriesIssued", &opt); sprintf(str,": %d", opt); 
+	mQueriesIssuedInfo->setCaption(str);
+
 	mSceneMgr->getOption("NumQueryCulledNodes", &opt); sprintf(str,": %d", opt); 
 	mQueryCulledNodesInfo->setCaption(str);
@@ -298,5 +312,5 @@
 
 	sprintf(str,": %d", mSceneContentGenerator->GetObjectCount()); 
-	mNumObjectsInfo->setCaption(str);
+	mObjectsInfo->setCaption(str);
 }
 //-----------------------------------------------------------------------
Index: trunk/VUT/work/TestCulling/TestCullingApplication.h
===================================================================
--- trunk/VUT/work/TestCulling/TestCullingApplication.h	(revision 86)
+++ trunk/VUT/work/TestCulling/TestCullingApplication.h	(revision 87)
@@ -63,7 +63,8 @@
 	void setAlgorithm(int algorithm);
 	void changeThreshold(int incr);
-	void changeStats();
+	void updateStats();
 	void toggleUseOptimization();
 	void toggleShowOctree();
+	void toggleUseCulling();
 
 protected:
@@ -84,6 +85,7 @@
 	OverlayElement *mHierarchyNodesInfo;
 	OverlayElement *mRenderedNodesInfo;
-	OverlayElement *mNumObjectsInfo;
+	OverlayElement *mObjectsInfo;
 	OverlayElement *mUseOptimizationInfo;
+	OverlayElement *mQueriesIssuedInfo;
 
 	SceneContentGenerator *mSceneContentGenerator;
@@ -91,4 +93,5 @@
 	bool mUseOptimization;
 	bool mShowOctree;
+	bool mUseCulling;
 };
 
