Index: trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp
===================================================================
--- trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp	(revision 160)
+++ trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp	(revision 161)
@@ -58,4 +58,5 @@
 	0.07
 };
+
 //-----------------------------------------------------------------------
 TerrainFrameListener::TerrainFrameListener(RenderWindow* win, Camera* cam, 
@@ -118,5 +119,6 @@
 mRenderPatchesForItemBuffer(false),
 mCurrentObjectType(0),
-mApplication(app)
+mApplication(app),
+mUseAnimation(false)
 {
 	//mInputDevice = PlatformManager::getSingleton().createInputReader();
@@ -203,21 +205,10 @@
 		 //Vector3 queryResult; mRayQueryExecutor->executeRayQuery(&queryResult, mouseRay);
 		 
+		 Real val = Math::RangeRandom(0, 360); // random rotation
 		 // get results, create a node/entity on the position
 		 mCurrentObject = mTerrainContentGenerator->GenerateSceneObject(
-			 mouseRay.getOrigin()/*queryResult*/, Vector3::ZERO, 
+			 mouseRay.getOrigin()/*queryResult*/, Vector3(val, 0, 0), 
 			 mApplication->getCurrentObjectCaption(mCurrentObjectType));
 		
-		 if (mCurrentObjectType == 0) // only robot has animation phases
-		 {
-			 Entity *ent = mTerrainContentGenerator->GetGeneratedEntities()->back();
-			 AnimationState *st = ent->getAnimationState("Walk");
-
-			 st->setLoop(true);
-			 st->setEnabled(true);
-					
-			 mApplication->getAnimationStates().push_back(st);
-			 mApplication->getAnimationSpeed().push_back(Math::RangeRandom(0.5, 1.5));
-		 }
-
          mLMouseDown = true; 
      }
@@ -228,13 +219,14 @@
          mRMouseDown = true;
      }
-} 
-//-----------------------------------------------------------------------
-void TerrainFrameListener::mouseReleased(MouseEvent* e)
-{
-    // Left mouse button up
+}
+//-----------------------------------------------------------------------
+void TerrainFrameListener::mouseDragDropped(MouseEvent* e)
+{
+	// Left mouse button up
     if (e->getButtonID() & InputEvent::BUTTON0_MASK)
     {
 		CEGUI::MouseCursor::getSingleton().show();
-        mLMouseDown = false;
+		
+	    mLMouseDown = false;
     }
     // Right mouse button up
@@ -242,4 +234,32 @@
     {
         CEGUI::MouseCursor::getSingleton().show();
+
+		mRMouseDown = false;
+    }
+}
+//-----------------------------------------------------------------------
+void TerrainFrameListener::mouseReleased(MouseEvent* e)
+{
+    // Left mouse button up
+    if (e->getButtonID() & InputEvent::BUTTON0_MASK)
+    {
+		CEGUI::MouseCursor::getSingleton().show();
+		
+		// start animation: only robot has animation phases
+		if (mCurrentObject && (mCurrentObjectType == TestCullingTerrainApplication::ROBOT))
+		{
+			// HACK: not neccesary the last element
+			Entity *ent = mTerrainContentGenerator->GetGeneratedEntities()->back();
+			EntityState *entState = new EntityState(ent, EntityState::MOVING, Math::RangeRandom(0.5, 1.5));
+			mApplication->getEntityStates().push_back(entState);
+		}
+
+	    mLMouseDown = false;
+    }
+    // Right mouse button up
+    else if (e->getButtonID() & InputEvent::BUTTON1_MASK)
+    {
+        CEGUI::MouseCursor::getSingleton().show(); 
+
         mRMouseDown = false;
     }
@@ -251,4 +271,7 @@
 	 if (mLMouseDown)
      {
+		 if (!mCurrentObject)
+			 return;
+
 		 Vector3 queryResult;
 		 Ray mouseRay = mCamera->getCameraToViewportRay(e->getX(), e->getY());
@@ -256,11 +279,7 @@
 		 if (mRayQueryExecutor->executeRayQuery(&queryResult, mouseRay))
 		 {
-			 if (mCurrentObject)
-			 {
-				 // apply offset so object is ON terrain
-				 queryResult.y += currentObjectTerrainOffsets[mCurrentObjectType];
-
-				 mCurrentObject->setPosition(queryResult);
-			 }
+			 // apply offset so object is ON terrain
+			 queryResult.y += currentObjectTerrainOffsets[mCurrentObjectType];
+			 mCurrentObject->setPosition(queryResult);
 		 }
      }
@@ -281,14 +300,12 @@
         return false;
 	}
-
-	for (int i = 0; i < (int)mApplication->getAnimationStates().size(); ++i)
-    {
-		mApplication->getAnimationStates()[i]->addTime(evt.timeSinceLastFrame * 
-			 mApplication->getAnimationSpeed()[i]);
-    }
-
-	if (mDisplayCameraDetails)
-    {
-        // Print camera details
+	
+	if (mUseAnimation) // update animations
+	{
+		mApplication->updateAnimations(evt.timeSinceLastFrame);
+	}
+
+	if (mDisplayCameraDetails)  // Print camera details
+    {       
         mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + 
 			" " + "O: " + StringConverter::toString(mCamera->getDerivedOrientation()));
@@ -369,6 +386,7 @@
 		// move camera according to input
 		moveCamera();
+
 		// clamp camera so we always walk along the terrain
-		Clamp2Terrain();
+		mApplication->Clamp2Terrain(mCamNode, 10);
 		break;
 
@@ -524,18 +542,5 @@
 	delete mQueryManager;
 }
-//-----------------------------------------------------------------------
-void TerrainFrameListener::Clamp2Terrain()
-{
-	// clamp camera to terrain
-	Vector3 camPos = mCamNode->getPosition();
-	Vector3 queryResult;
-
-	if (mRayQueryExecutor->executeRayQuery(&queryResult, 
-			Vector3(camPos.x, 5000.0f, camPos.z), Vector3::NEGATIVE_UNIT_Y))
-	{
-		const int terrainOffs = 10;
-		mCamNode->setPosition(camPos.x, queryResult.y + terrainOffs, camPos.z);
-	}
-}
+
 //-----------------------------------------------------------------------
 bool TerrainFrameListener::frameEnded(const FrameEvent& evt)
@@ -771,5 +776,8 @@
 		//guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS));
 		if (mTimeDelay < 0) // only update once per second
+		{		
 			guiAvg->setCaption(avgFpsString + StringConverter::toString(avgFps) + " ms");
+		}
+
 		guiCurr->setCaption(currFpsString + StringConverter::toString(stats.lastFPS));
 		guiBest->setCaption(bestFpsString + StringConverter::toString(stats.bestFPS)
@@ -1025,5 +1033,7 @@
 		mApplication->generateScene(500, mCurrentObjectType);
 		break;
-	
+	case KC_F9:
+		toggleUseAnimation();
+		break;
 	case KC_F11:
 		takeScreenShot();
@@ -1043,7 +1053,6 @@
 		break;
 	case KC_DELETE:
+		mApplication->deleteEntityStates();
 		mTerrainContentGenerator->RemoveGeneratedObjects();
-		mApplication->getAnimationStates().clear();
-		mApplication->getAnimationSpeed().clear();
 		break;
 	//KEY_PRESSED(KC_F3, 0.3, writeFrames());
@@ -1300,4 +1309,5 @@
 	initHelpOverlayElement("AppState", top); top += vert_space;
 	initHelpOverlayElement("Recorded", top); top += vert_space;
+	initHelpOverlayElement("Animation", top); top += vert_space;
 	initHelpOverlayElement("Screenshots", top); top += vert_space;
 	initHelpOverlayElement("WriteOut", top); top += vert_space;
@@ -1358,4 +1368,5 @@
 	initOverlayElement(&mAssumedVisibilityInfo, ext, "AssumedVisibility", top, ": 0"); top += vert_space;
 	initOverlayElement(&mCurrentObjectTypeInfo, ext, "CurrentObjectType", top, ": "); top += vert_space;
+	//initOverlayElement(&mHelpInfo, ext, "Help", top, ": "); top += vert_space;
 
 	OverlayElement *optionsPanel = OverlayManager::getSingleton().
@@ -1404,2 +1415,7 @@
 	queryPanel->setHeight(top + border_height);
 }
+//-----------------------------------------------------------------------
+void TerrainFrameListener::toggleUseAnimation()
+{
+	mUseAnimation = !mUseAnimation;
+}
Index: trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
===================================================================
--- trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp	(revision 160)
+++ trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp	(revision 161)
@@ -7,4 +7,5 @@
 
 #include <Ogre.h>
+
 //#include "OgreReferenceAppLayer.h"
 //#include "OgreRefAppWorld.h"
@@ -23,4 +24,110 @@
 };
 
+/***************************************/
+/*      EntityState implementation     */
+/***************************************/
+EntityState::EntityState(Entity *ent, State entityState, Real speed):
+mEntity(ent), mState(entityState), mAnimationSpeed(speed)
+{
+	switch(entityState)
+	{
+	case MOVING:
+		mAnimationState = mEntity->getAnimationState("Walk");
+		break;
+	case WAITING:
+		mAnimationState = mEntity->getAnimationState("Idle");
+		break;
+	case STOP:
+		mAnimationState = NULL;
+		break;
+	default:
+		break;
+	}
+	// enable animation state
+	if (mAnimationState)
+	{
+		mAnimationState->setLoop(true);
+		mAnimationState->setEnabled(true);
+	}
+	mTimeElapsed = Math::RangeRandom(1, 5);
+}
+//-----------------------------------------------------------------------
+Entity *EntityState::GetEntity()
+{
+	return mEntity;
+}
+//-----------------------------------------------------------------------
+EntityState::State EntityState::GetState()
+{
+	return mState;
+}
+//-----------------------------------------------------------------------
+void EntityState::update(Real timeSinceLastFrame)
+{
+	mTimeElapsed -= timeSinceLastFrame * mAnimationSpeed;
+	
+	if (mState == MOVING) // toggle between moving (longer) and waiting (short)
+	{
+		SceneNode *parent = mEntity->getParentSceneNode();
+
+		if (mTimeElapsed <= 0) // toggle animation state
+		{
+			if (mAnimationState->getAnimationName() == "Idle")
+			{
+				SetAnimationState("Walk", true);
+				mTimeElapsed = 10; // walk for mTimeElapsed units
+
+				// choose random direction between zero and two pi
+				Radian rnd = Radian(Math::UnitRandom() * Math::HALF_PI);
+
+				//mEntity->getParentSceneNode()->rotate();
+				parent->yaw(rnd);						
+			}
+			else 
+			{
+				SetAnimationState("Idle", true);
+				mTimeElapsed = 2; // wait for mTimeElapsed seconds
+			}
+		}
+
+		if (mAnimationState->getAnimationName() == "Walk")
+		{
+			Vector3 oldPos = parent->getPosition();
+
+			parent->translate(parent->getLocalAxes(), Vector3(0.03 * mAnimationSpeed, 0, 0));
+
+			// HACK: if out of bounds => go back to idle
+			if (OutOfBounds(parent)) 
+			{
+				parent->setPosition(oldPos);
+				SetAnimationState("Idle);
+				
+				mTimeElapsed = 2;
+			}
+		}
+	}
+		
+	if (mAnimationState) // add time to drive animation
+	{
+		mAnimationState->addTime(timeSinceLastFrame * mAnimationSpeed);
+	}
+}
+//-----------------------------------------------------------------------
+void EntityState::SetAnimationState(String stateStr, bool loop)
+{
+	mAnimationState = mEntity->getAnimationState(stateStr);
+	mAnimationState->setLoop(loop);
+	mAnimationState->setEnabled(true);
+}
+//-----------------------------------------------------------------------
+bool EntityState::OutOfBounds(SceneNode *node)
+{
+	Vector3 pos = node->getPosition();
+
+	if ((pos > msMinPos) && (pos < msMaxPos))
+		return true;
+
+	return false;
+}
 /*********************************************************/
 /*      TestCullingTerrainApplication implementation     */
@@ -35,9 +142,17 @@
 TestCullingTerrainApplication::~TestCullingTerrainApplication()
 {
-	if (mTerrainContentGenerator)
-	{
-		delete mTerrainContentGenerator;
-		mTerrainContentGenerator = NULL;
-	}
+	OGRE_DELETE(mTerrainContentGenerator);
+	OGRE_DELETE(mRayQueryExecutor);
+	deleteEntityStates();
+}
+//-----------------------------------------------------------------------
+void TestCullingTerrainApplication::deleteEntityStates()
+{
+	for (int i = 0; i < (int)mEntityStates.size(); ++i)
+	{
+		delete mEntityStates[i];
+		mEntityStates[i] = NULL;
+	}
+	mEntityStates.clear();
 }
 //-----------------------------------------------------------------------
@@ -133,4 +248,7 @@
 	mSceneMgr->setWorldGeometry(terrain_cfg);
 	
+	// ray query executor
+	mRayQueryExecutor = new RayQueryExecutor(mSceneMgr);
+
 	//-- CEGUI setup
 	setupGui();
@@ -185,24 +303,30 @@
 
 	//-- add animation state for new robots (located at the end of the list)
-	for (int i = entList->size() - num; i < entList->size(); ++i)
-	{
-		Entity *ent = (*entList)[i];
-		AnimationState *st = ent->getAnimationState("Idle");
-		st->setEnabled(true);
-		st->setLoop(true);
-
-		mAnimationStates.push_back(st);
-		mAnimationSpeed.push_back(Math::RangeRandom(0.5, 1.5));
-	}
-}
-//-----------------------------------------------------------------------
-std::vector<AnimationState *> &TestCullingTerrainApplication::getAnimationStates()
-{
-	return mAnimationStates;
-}
-//-----------------------------------------------------------------------
-std::vector<Real> &TestCullingTerrainApplication::getAnimationSpeed()
-{
-	return mAnimationSpeed;
+	for (int i = entList->size() - num; i < (int)entList->size(); ++i)
+	{
+		mEntityStates.push_back(new EntityState((*entList)[i], 
+			EntityState::WAITING, Math::RangeRandom(0.5, 1.5)));
+	}
+}
+//-----------------------------------------------------------------------
+void TestCullingTerrainApplication::updateAnimations(Real timeSinceLastFrame)
+{
+	for (int i = 0; i < (int)mEntityStates.size(); ++i)
+	{
+		SceneNode *sm = mEntityStates[i]->GetEntity()->getParentSceneNode();
+
+		mEntityStates[i]->update(timeSinceLastFrame);
+
+		if (mEntityStates[i]->GetState() == EntityState::MOVING)
+		{
+			Clamp2Terrain(sn, 0);
+			//sm->setNodeVisible(false);
+		}
+	}
+}
+//-----------------------------------------------------------------------
+EntityStates  &TestCullingTerrainApplication::getEntityStates()
+{
+	return mEntityStates;
 }
 //-----------------------------------------------------------------------
@@ -239,4 +363,22 @@
 	mSceneMgr = mRoot->getSceneManager(ST_EXTERIOR_CLOSE);
 }
+//-----------------------------------------------------------------------
+bool TestCullingTerrainApplication::Clamp2Terrain(SceneNode *node, int terrainOffs)
+{
+	// clamp scene node to terrain
+	Vector3 pos = node->getPosition();
+	Vector3 queryResult;
+
+	if (mRayQueryExecutor->executeRayQuery(&queryResult, 
+			Vector3(pos.x, MAX_HEIGHT, pos.z), Vector3::NEGATIVE_UNIT_Y))
+	{
+        node->setPosition(pos.x, queryResult.y + terrainOffs, pos.z);
+		return true;
+	}
+
+	return false;
+}
+
+
 /**************************************************************/
 /*      VisualizationRenderTargetListener implementation      */
Index: trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.h
===================================================================
--- trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.h	(revision 160)
+++ trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.h	(revision 161)
@@ -21,8 +21,8 @@
 #define VIZ_VIEWPORT_Z_ORDER 10
 
-
-/** Mouse query listener for terrain 
+/** Frame listener specialised for terrains.
 */
-class TerrainFrameListener: public FrameListener, public MouseListener, public MouseMotionListener, public KeyListener
+class TerrainFrameListener: public FrameListener, public MouseListener, 
+							public MouseMotionListener, public KeyListener
 {
 public:
@@ -52,15 +52,16 @@
 
    // This is when the mouse button goes DOWN.
-   virtual void mousePressed(MouseEvent* e);
+   void mousePressed(MouseEvent* e);
 
    // This is when the mouse button is let UP.
-   virtual void mouseReleased(MouseEvent* e);
+   void mouseReleased(MouseEvent* e);
 
    /* MouseMotionListener callbacks */
-   virtual void mouseMoved (MouseEvent *e);
+   void mouseMoved(MouseEvent *e);
    
    // This is when the mouse is clicked, held and dragged.
-   virtual void mouseDragged (MouseEvent *e);
-
+   void mouseDragged(MouseEvent *e);
+
+   void mouseDragDropped(MouseEvent *e);
    void keyPressed(KeyEvent* e);
 
@@ -68,5 +69,6 @@
    void keyClicked(KeyEvent* e);
   
-   /** The information about camera position and orienation per frame */
+   /** The information about camera position and orienation per frame.
+   */
    typedef struct
    {
@@ -123,4 +125,5 @@
 	void toggleShowViz();
 	void toggleRecord();
+	void toggleUseAnimation();
 
 	/** Applies visibility query. Collects the visible objects 
@@ -150,8 +153,4 @@
 
 	void resetStats();
-
-	/** Clamp camera to terrain.
-	*/
-	void Clamp2Terrain();
 	
 	SceneManager *mSceneMgr;           // A pointer to the scene manager
@@ -198,4 +197,5 @@
 	OverlayElement *mQueryGeometryVisibilityInfo;
 	OverlayElement *mQueryPatchVisibilityInfo;
+	//OverlayElement *mHelpInfo;
 
 	RayQueryExecutor *mRayQueryExecutor;
@@ -216,4 +216,6 @@
 	bool mDisplayCameraDetails;
 	bool mUseItemBuffer;
+	bool mUseAnimation;
+	bool mRenderPatchesForItemBuffer;
 
 	Real mVizCameraHeight;
@@ -268,6 +270,4 @@
 	float mDelayedTraversedNodes;
 
-	bool mRenderPatchesForItemBuffer;
-
 	int mCurrentObjectType;
 
Index: trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h
===================================================================
--- trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h	(revision 160)
+++ trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h	(revision 161)
@@ -8,4 +8,6 @@
 #include "OgreTerrainContentGenerator.h"
 #include "TerrainFrameListener.h"
+
+#include <OgreEntity.h>
 
 class VisualizationRenderTargetListener: public RenderTargetListener
@@ -24,4 +26,38 @@
 };
 
+/** Class storing the current state of an entity.
+*/
+class EntityState
+{
+public:
+	enum State {STOP, WAITING, MOVING};
+
+	EntityState(Entity *ent, State entityState, Real speed);
+
+	/** Update the entity state.
+	*/
+	void update(Real timeSinceLastFrame);
+
+	/** Returns entity.
+	*/
+	Entity *GetEntity();
+
+	/** Returns entity state index.
+	*/
+	EntityState::State GetState();
+
+protected:
+
+	void SetAnimationState(String stateStr, bool loop);
+
+	AnimationState *mAnimationState;
+	Entity *mEntity;
+
+	State mState;
+	Real mAnimationSpeed;
+	Real mTimeElapsed;
+};
+
+typedef std::vector<EntityState *> EntityStates;
 
 class TestCullingTerrainApplication: public ExampleApplication
@@ -31,10 +67,36 @@
 	~TestCullingTerrainApplication();
 
+	/** Generates a scene using num entities of a type. 
+		@param num the number of objects
+		@parma objectType the type of objects
+	*/
 	void generateScene(int num, int objectType);
 
+	/** Returns the caption of the given id of a scene object type.
+	*/
 	String getCurrentObjectCaption(int id);
 
-	std::vector<AnimationState *> &getAnimationStates();
-	std::vector<Real> &getAnimationSpeed();
+	/** Returns state vector of scene entities.
+	*/
+	EntityStates &getEntityStates();
+
+	/** Updates all animations according to time elapsed since last frame.
+	*/
+    void updateAnimations(Real timeSinceLastFrame);
+
+	/** Deletes vector of scene entity states.
+	*/
+	void deleteEntityStates();
+
+	// object types
+	enum {ROBOT, ATHENA, NINJA};
+
+	
+	/** Clamps scene node to terrain.
+		@param sceneNode the node to be clamped
+		@param terrainOffs the offset of the node over the terrain
+		@returns if clamping was successful (i.e., the ray hit the terrain)
+	*/
+	bool Clamp2Terrain(SceneNode *node, int terrainOffs);
 
 protected:
@@ -49,8 +111,8 @@
 	virtual void createRenderTargetListener();
 
-	std::vector<AnimationState *> mAnimationStates;
-	std::vector<Real> mAnimationSpeed;
+	std::vector<EntityState *> mEntityStates;
 
-	/** cegui setup */
+	/** cegui setup 
+	*/
 	void setupGui();
 
@@ -72,5 +134,6 @@
 	TerrainFrameListener *mTerrainFrameListener;
 	ColourValue mAmbientLight;
-	
+	RayQueryExecutor *mRayQueryExecutor;
+
 private:
 	void chooseSceneManager(void);
Index: trunk/VUT/Ogre/include/OgreTerrainContentGenerator.h
===================================================================
--- trunk/VUT/Ogre/include/OgreTerrainContentGenerator.h	(revision 135)
+++ trunk/VUT/Ogre/include/OgreTerrainContentGenerator.h	(revision 161)
@@ -4,4 +4,6 @@
 #include "OgreSceneContentGenerator.h"
 //#include <Ogre.h>
+
+#define MAX_HEIGHT 5000 // maximal possible height for object position
 
 namespace Ogre {
@@ -23,5 +25,6 @@
 
 /** 
-	Class which randomly fills a terrain with objects.
+	Thsi class used to fill a terrain with content,
+	e.g., it randomly fills a terrain with objects of a specific type.
 */
 class __declspec(dllexport) TerrainContentGenerator: public SceneContentGenerator
@@ -31,11 +34,9 @@
 	~TerrainContentGenerator();
 
-	/** 
-		Generates objects and places it on the terrain.
+	/** Generates objects and places it on the terrain.
 	*/
 	SceneNode *GenerateSceneObject(const Vector3 &position, 
 		const Vector3 &rotation, const String &objName);
-	/** 
-		Generates objects and optionally places it on the terrain.
+	/** Generates objects and optionally places it on the terrain.
 		@param clampToTerrain if true, scene object is clamped to the terrain
 	*/
@@ -43,8 +44,7 @@
 		const Vector3 &rotation, const String &objName, const bool clampToTerrain);
 	
-	/** offset which is added to objects when put into the terrain */
+	/** The offset is added to objects when they are put into the terrain.
+	*/
 	void SetOffset(Real offset);
-	
-	RayQueryExecutor *GetRayQueryExecutor();
 
 protected:
Index: trunk/VUT/Ogre/src/OgreTerrainContentGenerator.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreTerrainContentGenerator.cpp	(revision 135)
+++ trunk/VUT/Ogre/src/OgreTerrainContentGenerator.cpp	(revision 161)
@@ -1,5 +1,4 @@
 #include "OgreTerrainContentGenerator.h"
 
-#define MAX_HEIGHT 5000 // maximal possible height
 
 namespace Ogre {
@@ -69,14 +68,9 @@
 SceneNode *TerrainContentGenerator::GenerateSceneObject(const Vector3 &position, 
 					 const Vector3 &rotation, const String& objName, const bool clampToTerrain)
-{
+{	
+	if (clampToTerrain)
+		return GenerateSceneObject(position, rotation, objName);
 	
-	if (clampToTerrain)
-	{
-		return GenerateSceneObject(position, rotation, objName);
-	}
-	else
-	{
-		return SceneContentGenerator::GenerateSceneObject(position, rotation, objName);
-	}
+	return SceneContentGenerator::GenerateSceneObject(position, rotation, objName);
 }
 //-----------------------------------------------------------------------
@@ -103,9 +97,4 @@
 }
 //-----------------------------------------------------------------------
-RayQueryExecutor *TerrainContentGenerator::GetRayQueryExecutor()
-{
-	return mRayQueryExecutor;
-}
-//-----------------------------------------------------------------------
 void TerrainContentGenerator::SetOffset(Real offset)
 {
Index: trunk/VUT/Ogre/resources/VisibilityDemo.overlay
===================================================================
--- trunk/VUT/Ogre/resources/VisibilityDemo.overlay	(revision 160)
+++ trunk/VUT/Ogre/resources/VisibilityDemo.overlay	(revision 161)
@@ -326,4 +326,11 @@
 			caption [F4] Start / End frame recording
 		}
+		element TextArea(Example/Visibility/Help/Animation): Example/Visibility/Templates/BasicText
+		{
+			left 5
+			width 180
+			height 30
+			caption [F9] Start / End animation
+		}
 		element TextArea(Example/Visibility/Help/Screenshots): Example/Visibility/Templates/BasicText
 		{
