Index: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeFrameListener.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeFrameListener.cpp	(revision 900)
+++ GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeFrameListener.cpp	(revision 961)
@@ -106,4 +106,13 @@
 	}
 
+	if (mInputDevice->isKeyDown(Ogre::KC_F7))
+	{		
+		mCurrentOgreFrameListenerMode = 6;
+		this->setEnabledFrameListenerMode(mCurrentOgreFrameListenerMode);
+		mWindow->setDebugText("");
+
+		//mTimeUntilNextToggle = 0.25;		
+	}
+
 	// Return true to continue rendering
 	return true;
Index: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCSceneViewMode.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCSceneViewMode.cpp	(revision 961)
+++ GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCSceneViewMode.cpp	(revision 961)
@@ -0,0 +1,33 @@
+#include "LBBCSceneViewMode.h"
+
+namespace LBBC 
+{
+
+SceneViewMode::SceneViewMode(Ogre::RenderWindow* win, unsigned int ogreFrameListenerModeHandle, bool useBufferedInputKeys, bool useBufferedInputMouse) 
+	:OBA::OgreFrameListenerMode(win, ogreFrameListenerModeHandle, useBufferedInputKeys, useBufferedInputMouse)
+	{
+		showDebugOverlay(false);
+	}
+
+SceneViewMode::~SceneViewMode()
+{	
+	// Gametools -- BUG: 06/04/2006
+	//destroyScene();
+}
+
+void SceneViewMode::setSceneName(Ogre::String filename)
+{
+	mSceneFileName = filename;
+}
+
+void SceneViewMode::createScene()
+{
+
+}
+
+void SceneViewMode::destroyScene()
+{
+
+}
+
+}
Index: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeApplication.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeApplication.cpp	(revision 950)
+++ GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeApplication.cpp	(revision 961)
@@ -253,4 +253,17 @@
 	}
 
+	{
+		LBBC::SceneViewMode *anotherFrameListenerMode;
+		anotherFrameListenerMode = new LBBC::SceneViewMode(mWindow,mFrameListener->getNumFrameListenerModes());
+		anotherFrameListenerMode->chooseSceneManager();
+		anotherFrameListenerMode->createCamera();
+		anotherFrameListenerMode->createViewports();
+		anotherFrameListenerMode->createScene();
+		//anotherFrameListenerMode->loadScene("../../media/scene/scene.OSM");
+		////anotherFrameListenerMode->loadScene("../../media/scene/sceneLeaves.OSM");
+		//anotherFrameListenerMode->loadScene("../../media/scene/scenePointLeaves.OSM");
+		mFrameListener->addFrameListenerMode(anotherFrameListenerMode);
+	}
+
 	mFrameListener->removeFrameListenerMode(0);
 	mFrameListener->setEnabledFrameListenerMode(0);
Index: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/OBAOgreFrameListenerMode.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/OBAOgreFrameListenerMode.cpp	(revision 900)
+++ GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/OBAOgreFrameListenerMode.cpp	(revision 961)
@@ -3,4 +3,11 @@
 
 namespace OBA {
+
+void OSceneCallback::OnCameraCreate(Ogre::Camera* pCamera, TiXmlElement* pCameraDesc) 
+{
+	// If a camera of name "FirstCamera" is loaded, it will be set as the default current 
+	if(pCamera->getName() == "FirstCamera")
+		Ogre::Root::getSingleton().getAutoCreatedWindow()->getViewport(0)->setCamera(pCamera);
+}
 
 OgreFrameListenerMode::OgreFrameListenerMode(Ogre::RenderWindow *win, unsigned int ogreFrameListenerModeHandle, bool useBufferedInputKeys, bool useBufferedInputMouse)
@@ -121,4 +128,33 @@
         mCamera->yaw(mRotScale);
     }
+
+	// We can cycle cameras with the 'c' key
+	if (mInputDevice->isKeyDown(Ogre::KC_C) && (mTimeUntilNextToggle <= 0)) 
+	{			
+
+		Ogre::Camera* firstCam;
+		Ogre::Camera* currentCam = mWindow->getViewport(0)->getCamera();
+
+		Ogre::Viewport* vp = mWindow->getViewport(0);
+
+		Ogre::SceneManager::CameraIterator it = mSceneMgr->getCameraIterator();
+
+		if(it.hasMoreElements())
+		{
+			firstCam = it.peekNextValue();
+		}
+
+		while(it.hasMoreElements()) 
+		{			
+			Ogre::Camera* cam = it.getNext();
+
+			if(currentCam == cam) 
+			{
+				Ogre::Camera* camera = it.hasMoreElements() ? it.getNext() : firstCam;
+				vp->setCamera(camera);					
+			}
+		}
+		mTimeUntilNextToggle = 0.5f;		
+	}
 
 	// see if switching is on, and you want to toggle 
@@ -303,4 +339,27 @@
 	}
 
+	static Ogre::Real currentTime = 0;
+
+	// We update all loaded animations each frame
+	Ogre::SceneManager::AnimationIterator animationIt = mSceneMgr->getAnimationIterator();
+
+	while(animationIt.hasMoreElements()) 
+	{
+		Ogre::Animation* animation = animationIt.getNext();
+		
+		const Ogre::Animation::NodeTrackList& trackList = animation->_getNodeTrackList();
+		
+		Ogre::Animation::NodeTrackList::const_iterator it = trackList.begin();
+		Ogre::Animation::NodeTrackList::const_iterator iend = trackList.end();
+
+		for(; it != iend; ++it) {
+			const Ogre::NodeAnimationTrack* track = it->second;
+			track->getAssociatedNode()->resetToInitialState();
+		}
+		
+		currentTime += evt.timeSinceLastFrame;
+		animation->apply(currentTime);
+	}		
+  
 	return true;
 }
@@ -410,4 +469,18 @@
 }
 
+void OgreFrameListenerMode::loadScene(Ogre::String filename)
+{
+	// Create an oE_Loader Callback object to post-process created objects
+	OSceneCallback oeCallback;
+	
+	mOScene = new OSMScene(mSceneMgr, mWindow);
+
+	// Initialises with the scene to be loaded and the callback if requiered
+	mOScene->initialise(filename.c_str(), &oeCallback);
+
+	// create and setup the scene in the root node
+	mOScene->createScene();
+}
+
 void OgreFrameListenerMode::createScene()
 {
Index: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCDiffuseColorPointClusterGenerator.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCDiffuseColorPointClusterGenerator.cpp	(revision 961)
+++ GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCDiffuseColorPointClusterGenerator.cpp	(revision 961)
@@ -0,0 +1,142 @@
+
+#include "LBBCDiffuseColorPointClusterGenerator.h"
+
+namespace LBBC 
+{
+
+DiffuseColorPointClusterGenerator::DiffuseColorPointClusterGenerator()
+{
+}
+
+DiffuseColorPointClusterGenerator::~DiffuseColorPointClusterGenerator()
+{
+}
+
+void DiffuseColorPointClusterGenerator::setBillboardCloud(BBC::BillboardCloud *billboardCloud)
+{
+	mBillboardCloud = billboardCloud;
+}
+
+BBC::BillboardCloud* DiffuseColorPointClusterGenerator::getBillboardCloud()
+{
+	return mBillboardCloud;
+}
+
+void DiffuseColorPointClusterGenerator::setEntity(BBC::EntityPtr entity)
+{
+	mEntity = entity;
+}
+
+BBC::EntityPtr DiffuseColorPointClusterGenerator::getEntity()
+{
+	return mEntity;
+}
+
+void DiffuseColorPointClusterGenerator::setNumSamples(Ogre::Real numSamples)
+{
+	mNumSamples = numSamples;
+}
+
+Ogre::Real DiffuseColorPointClusterGenerator::getNumSamples()
+{
+	return mNumSamples;
+}
+
+void DiffuseColorPointClusterGenerator::setMaterialName(Ogre::String materialName)
+{
+	mMaterialName = materialName;
+}
+
+Ogre::String DiffuseColorPointClusterGenerator::getMaterialName()
+{
+	return mMaterialName;
+}
+
+void DiffuseColorPointClusterGenerator::generateDiffuseColorPointCluster()
+{
+	unsigned int numSubEntities = 0;
+	mEntity->removeSubEntity(0);
+	
+	for (unsigned int iBillboard = 0; iBillboard < mBillboardCloud->getNumBillboards(); iBillboard++)
+	{
+		BBC::BillboardPtr billboard = mBillboardCloud->getBillboard(iBillboard);		
+		BBC::EntityClusterPtr entityCluster = billboard->getBillboardClusterData()->getEntityCluster();
+
+		if (entityCluster->getNumEntitiesClusterData() > 0)
+		{					
+			mEntity->createSubEntity();
+			mEntity->getSubEntity(numSubEntities)->setMaterialName(mMaterialName);
+			mEntity->getSubEntity(numSubEntities)->enableNormals(false);
+			mEntity->getSubEntity(numSubEntities)->enableTextureCoords(true);
+			mEntity->getSubEntity(numSubEntities)->addTextureCoordSet(2);
+			mEntity->getSubEntity(numSubEntities)->enableVertexColours(true);
+
+			Ogre::Vector3 p1, p2, p3, p4, pa, pb;
+			Ogre::Real height, width;
+
+			height = Ogre::Vector3(billboard->getBillboardClusterData()->getQuadTopLeftCorner() - billboard->getBillboardClusterData()->getQuadBottomLeftCorner()).length();
+			width = Ogre::Vector3(billboard->getBillboardClusterData()->getQuadTopLeftCorner() - billboard->getBillboardClusterData()->getQuadTopRightCorner()).length();
+
+			for (unsigned int iLeaf = 0; iLeaf < entityCluster->getNumEntitiesClusterData(); iLeaf++)
+			{
+				BBC::UniqueVertex vertex;
+
+				BBC::EntityClusterData* entityClusterData = entityCluster->getEntityClusterData(iLeaf).get();
+				Leaf *leaf = (Leaf*)entityClusterData->getEntity().get();
+				vertex.position = leaf->getPosition();
+
+				Ogre::Real numSamples = mNumSamples;
+				Ogre::Real randomInt = Ogre::Math::Ceil(Ogre::Math::RangeRandom(0.5,numSamples));
+
+				Ogre::Vector2 topLeftCorner[16];
+				topLeftCorner[0] = Ogre::Vector2(0.0,  0.0);
+				topLeftCorner[1] = Ogre::Vector2(0.25, 0.0);
+				topLeftCorner[2] = Ogre::Vector2(0.5,  0.0);
+				topLeftCorner[3] = Ogre::Vector2(0.75, 0.0);
+				topLeftCorner[4] = Ogre::Vector2(0.0,  0.25);
+				topLeftCorner[5] = Ogre::Vector2(0.25, 0.25);
+				topLeftCorner[6] = Ogre::Vector2(0.5,  0.25);
+				topLeftCorner[7] = Ogre::Vector2(0.75, 0.25);
+				topLeftCorner[8] = Ogre::Vector2(0.0,  0.5);
+				topLeftCorner[9] = Ogre::Vector2(0.25, 0.5);
+				topLeftCorner[10] = Ogre::Vector2(0.5,  0.5);
+				topLeftCorner[11] = Ogre::Vector2(0.75, 0.5);
+				topLeftCorner[12] = Ogre::Vector2(0.0,  0.75);
+				topLeftCorner[13] = Ogre::Vector2(0.25, 0.75);
+				topLeftCorner[14] = Ogre::Vector2(0.5,  0.75);
+				topLeftCorner[15] = Ogre::Vector2(0.75, 0.75);
+
+				vertex.uv[0] = Ogre::Vector3(1.0 - topLeftCorner[(unsigned int)randomInt-1][0], 1.0 - topLeftCorner[(unsigned int)randomInt-1][1], 0.0);
+				vertex.colour = Ogre::ColourValue(Ogre::Math::RangeRandom(0.0, 1.0), Ogre::Math::RangeRandom(0.0, 1.0), Ogre::Math::RangeRandom(0.0, 1.0), 1.0).getAsRGBA(); 
+				mEntity->getSubEntity(numSubEntities)->addUniqueVertex(vertex);
+			}
+
+			unsigned int iVertexFace = 0;
+			Ogre::Vector3 faceVertexIndices = Ogre::Vector3::ZERO;
+
+			for (unsigned int iVertex = 0; iVertex < mEntity->getSubEntity(numSubEntities)->getNumVertices(); iVertex++)
+			{
+				faceVertexIndices[iVertexFace] = iVertex;
+				iVertexFace++;
+				
+				if ((iVertex + 1) != mEntity->getSubEntity(numSubEntities)->getNumVertices())
+				{
+					if (iVertexFace == 3)
+					{
+						mEntity->getSubEntity(numSubEntities)->addFaceVerticesIDs(faceVertexIndices);
+						iVertexFace = 0;
+						faceVertexIndices = Ogre::Vector3::ZERO;
+					}
+				}
+				else
+				{
+					mEntity->getSubEntity(numSubEntities)->addFaceVerticesIDs(faceVertexIndices);
+				}				
+			}
+
+			numSubEntities++;
+		}
+	}
+}
+
+}
Index: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCManager.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCManager.cpp	(revision 958)
+++ GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCManager.cpp	(revision 961)
@@ -11,4 +11,5 @@
 	mLeafDistributionGenerator = new LeafDistributionGenerator();
 	mBillboardCloudGenerator = new KMeansClusterGenerator();
+	mDiffuseColorPointClusterGenerator = new DiffuseColorPointClusterGenerator();
 	mBillboardCloudUVMapper = new BBC::BillboardCloudUVMapper();
 	mOgreMeshSerializer = new BBC::OgreMeshSerializer();
@@ -34,4 +35,8 @@
 	{
 		delete mLeafDistributionSerializer;
+	}
+	if (mDiffuseColorPointClusterGenerator)
+	{
+		delete mDiffuseColorPointClusterGenerator;
 	}
 	if (mLeafDistributionGenerator)
@@ -499,143 +504,25 @@
 	}
 
-	saveBillboardCloudIndirectSplittedPointMeshName();
-}
-
-void LBBCManager::saveBillboardCloudIndirectSplittedPointMeshName()
+	generateBillboardCloudDiffuseColorPointCluster();
+}
+
+void LBBCManager::generateBillboardCloudDiffuseColorPointCluster()
 {
 	BBC::EntityPtr entity;
-	unsigned int numSubEntities = 0;
-
 	entity = BBC::EntityPtr(new BBC::Entity());
-	entity->removeSubEntity(0);
-	
-	for (unsigned int iBillboard = 0; iBillboard < getLeaves()->getBillboardCloud()->getNumBillboards(); iBillboard++)
-	{
-		BBC::BillboardPtr billboard = getLeaves()->getBillboardCloud()->getBillboard(iBillboard);		
-		BBC::EntityClusterPtr entityCluster = billboard->getBillboardClusterData()->getEntityCluster();
-
-		if (entityCluster->getNumEntitiesClusterData() > 0)
-		{					
-			entity->createSubEntity();
-			entity->getSubEntity(numSubEntities)->setMaterialName(mSampleConfigFile->getBillboardCloudIndirectPointMaterialName());
-			entity->getSubEntity(numSubEntities)->enableNormals(false);
-			entity->getSubEntity(numSubEntities)->enableTextureCoords(true);
-			entity->getSubEntity(numSubEntities)->addTextureCoordSet(2);
-			entity->getSubEntity(numSubEntities)->enableVertexColours(true);
-
-			Ogre::Vector3 p1, p2, p3, p4, pa, pb;
-			Ogre::Real mua, mub;
-			Ogre::Real height, width;
-			Ogre::Real hDistance, wDistance;
-
-			height = Ogre::Vector3(billboard->getBillboardClusterData()->getQuadTopLeftCorner() - billboard->getBillboardClusterData()->getQuadBottomLeftCorner()).length();
-			width = Ogre::Vector3(billboard->getBillboardClusterData()->getQuadTopLeftCorner() - billboard->getBillboardClusterData()->getQuadTopRightCorner()).length();
-
-			for (unsigned int iLeaf = 0; iLeaf < entityCluster->getNumEntitiesClusterData(); iLeaf++)
-			{
-				BBC::UniqueVertex vertex;
-
-				//LeafKMeansClusterData *leafKMeansClusterData = (LeafKMeansClusterData*)entityCluster->getEntityClusterData(iLeaf).get();
-				//Leaf *leaf = (Leaf*)leafKMeansClusterData->getEntity().get();
-				BBC::EntityClusterData* entityClusterData = entityCluster->getEntityClusterData(iLeaf).get();
-				Leaf *leaf = (Leaf*)entityClusterData->getEntity().get();
-				vertex.position = leaf->getPosition();
-
-				//hDistance = 0.0;
-				//wDistance = 0.0;
-
-				//p1 = billboard->getBillboardClusterData()->getQuadTopRightCorner();
-				//p2 = billboard->getBillboardClusterData()->getQuadBottomRightCorner();
-				//p3 = leaf->getPosition();
-				//p4 = leaf->getPosition() + billboard->getBillboardClusterData()->getAxisY();
-
-				//if (BBC::Util::lineLineIntersect(p1, p2, p3, p4, &pa, &pb, &mua, &mub))
-				//{
-				//	hDistance = Ogre::Vector3(pa - p1).length();
-				//}
-				//else
-				//{
-				//	Ogre::LogManager::getSingleton().logMessage("Error with intersection: no solution exists.");
-				//}
-
-				//p1 = billboard->getBillboardClusterData()->getQuadTopLeftCorner();
-				//p2 = billboard->getBillboardClusterData()->getQuadTopRightCorner();
-				//p3 = leaf->getPosition();
-				//p4 = leaf->getPosition() + billboard->getBillboardClusterData()->getAxisX();
-
-				//if (BBC::Util::lineLineIntersect(p1, p2, p3, p4, &pa, &pb, &mua, &mub))
-				//{
-				//	wDistance = Ogre::Vector3(pa - p2).length();
-				//}
-				//else
-				//{
-				//	Ogre::LogManager::getSingleton().logMessage("Error with intersection: no solution exists.");
-				//}
-
-				//Ogre::LogManager::getSingleton().logMessage("W:" + Ogre::StringConverter::toString(width) + " UW:" + Ogre::StringConverter::toString(wDistance));
-				//Ogre::LogManager::getSingleton().logMessage("H:" + Ogre::StringConverter::toString(height) + " UH:" + Ogre::StringConverter::toString(hDistance));
-
-				//vertex.uv[0] = Ogre::Vector3(wDistance / width, hDistance / height, 0.0);
-				//vertex.uv[0] = Ogre::Vector3(1.0 - (hDistance / height), 1.0 - (wDistance / width), 0.0);
-				Ogre::Real numSamples = mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasNumSamples();
-				Ogre::Real randomInt = Ogre::Math::Ceil(Ogre::Math::RangeRandom(0.5,numSamples));
-
-				Ogre::Vector2 topLeftCorner[16];
-				topLeftCorner[0] = Ogre::Vector2(0.0,  0.0);
-				topLeftCorner[1] = Ogre::Vector2(0.25, 0.0);
-				topLeftCorner[2] = Ogre::Vector2(0.5,  0.0);
-				topLeftCorner[3] = Ogre::Vector2(0.75, 0.0);
-				topLeftCorner[4] = Ogre::Vector2(0.0,  0.25);
-				topLeftCorner[5] = Ogre::Vector2(0.25, 0.25);
-				topLeftCorner[6] = Ogre::Vector2(0.5,  0.25);
-				topLeftCorner[7] = Ogre::Vector2(0.75, 0.25);
-				topLeftCorner[8] = Ogre::Vector2(0.0,  0.5);
-				topLeftCorner[9] = Ogre::Vector2(0.25, 0.5);
-				topLeftCorner[10] = Ogre::Vector2(0.5,  0.5);
-				topLeftCorner[11] = Ogre::Vector2(0.75, 0.5);
-				topLeftCorner[12] = Ogre::Vector2(0.0,  0.75);
-				topLeftCorner[13] = Ogre::Vector2(0.25, 0.75);
-				topLeftCorner[14] = Ogre::Vector2(0.5,  0.75);
-				topLeftCorner[15] = Ogre::Vector2(0.75, 0.75);
-
-				//vertex.uv[0] = Ogre::Vector3(randomInt / numSamples, 0.0, 0.0);
-				
-				vertex.uv[0] = Ogre::Vector3(1.0 - topLeftCorner[(unsigned int)randomInt-1][0], 1.0 - topLeftCorner[(unsigned int)randomInt-1][1], 0.0);
-				vertex.colour = Ogre::ColourValue(Ogre::Math::RangeRandom(0.0, 1.0), Ogre::Math::RangeRandom(0.0, 1.0), Ogre::Math::RangeRandom(0.0, 1.0), 1.0).getAsRGBA(); 
-				entity->getSubEntity(numSubEntities)->addUniqueVertex(vertex);
-			}
-
-			unsigned int iVertexFace = 0;
-			Ogre::Vector3 faceVertexIndices = Ogre::Vector3::ZERO;
-
-			for (unsigned int iVertex = 0; iVertex < entity->getSubEntity(numSubEntities)->getNumVertices(); iVertex++)
-			{
-				faceVertexIndices[iVertexFace] = iVertex;
-				iVertexFace++;
-				
-				if ((iVertex + 1) != entity->getSubEntity(numSubEntities)->getNumVertices())
-				{
-					if (iVertexFace == 3)
-					{
-						entity->getSubEntity(numSubEntities)->addFaceVerticesIDs(faceVertexIndices);
-						iVertexFace = 0;
-						faceVertexIndices = Ogre::Vector3::ZERO;
-					}
-				}
-				else
-				{
-					entity->getSubEntity(numSubEntities)->addFaceVerticesIDs(faceVertexIndices);
-				}				
-			}
-
-			numSubEntities++;
-		}
-	}
-	
-	mOgreMeshSerializer->setEntity(entity);
+	mDiffuseColorPointClusterGenerator->setEntity(entity);
+	mDiffuseColorPointClusterGenerator->setMaterialName(mSampleConfigFile->getBillboardCloudIndirectPointMaterialName());
+	mDiffuseColorPointClusterGenerator->setNumSamples(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasNumSamples());
+	mDiffuseColorPointClusterGenerator->setBillboardCloud(getLeaves()->getBillboardCloud());
+	mDiffuseColorPointClusterGenerator->generateDiffuseColorPointCluster();
+	saveBillboardCloudDiffuseColorPointCluster();
+}
+
+void LBBCManager::saveBillboardCloudDiffuseColorPointCluster()
+{
+	mOgreMeshSerializer->setEntity(mDiffuseColorPointClusterGenerator->getEntity());
 	mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudIndirectPointMeshName(), false, false);
-	OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getBillboardCloudIndirectPointMeshName());
+	OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mDiffuseColorPointClusterGenerator->getEntity()->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getBillboardCloudIndirectPointMeshName());
 	//OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getBillboardCloudIndirectPointMeshName() + ".xml");	
-
 }
 
