Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h	(revision 1552)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h	(revision 1560)
@@ -35,8 +35,8 @@
 	{
 		unsigned	long	strip; // change this to uint32
-		char		position;
-		char		vertexRepetition;
-		char		edgeRepetition;
-		char		obligatory;
+		char						position;
+		char						vertexRepetition;
+		char						edgeRepetition;
+		char						obligatory;
 	}	LODRegisterType;
 
@@ -73,10 +73,12 @@
 	class LodStripsLibraryData
 	{
-	public:
-		SmallIntVector					mFileVertices;
-		std::vector	<LODRegisterType>	mFileChangesLOD;
-		LongVector						mData;
-		std::vector<unsigned int>		p_changes;
+		public:
+
+			SmallIntVector								mFileVertices;
+			std::vector	<LODRegisterType>	mFileChangesLOD;
+			LongVector										mData;
+			std::vector<unsigned int>			p_changes;
 	};
+
 	class LodStripsLibrary : public Geometry::LodObject
 	{
@@ -88,8 +90,8 @@
 			//	Structures with the data read from the file
 			//	We won't work with these structures
-			SmallIntVector					mFileVertices;
+			SmallIntVector								mFileVertices;
 			std::vector	<LODRegisterType>	mFileChangesLOD;
 			std::vector	<SmallIntVector>	mFileStrips;
-			LongVector						mData;
+			LongVector										mData;
 
 			//	Structures with the data to work with
@@ -113,9 +115,9 @@
 
 			//	For the efficient version.
-			SmallInt	mTotalFaces;
-			SmallInt	*mCurrentData;
-			SmallInt	*mStripsChanges;
+			SmallInt				mTotalFaces;
+			SmallInt				*mCurrentData;
+			SmallInt				*mStripsChanges;
 			LODRegisterType	*mCurrentRegLOD;
-			SmallInt	*mVertex;
+			SmallInt				*mVertex;
 
 			SmallInt	minFaces, maxFaces;
@@ -140,25 +142,32 @@
 			//	Strips vector.
 			SmallIntVector	*mStrips;
-			int *indices_x_submesh;
+
+			int	*indices_x_submesh;
 			int *offsets_x_submesh;
 
-			void UpdateDataRetrievalInterface(void);			
+			void UpdateDataRetrievalInterface(void);
 
 			//Number of strips in each submesh
-			int* mStripsSubmesh;
-			bool delete_indexdata;
-			int *submesh_x_strip;
-			Real lodFactor;
-			IndexData *dataRetrievalInterface;
-			uint32 current_triangle_count;
+			int		*mStripsSubmesh;
+			bool	delete_indexdata;
+			int		*submesh_x_strip;
+			Real	lodFactor;
+
+			IndexData	*dataRetrievalInterface;
+			uint32		current_triangle_count;
 
 		public:
 
-			IndexData *GetIndexDataInterface(void){ return dataRetrievalInterface; }
+			IndexData *GetIndexDataInterface(void)
+			{
+				return dataRetrievalInterface;
+			}
 			
 			/**	Constructor, receives as a parameter the name of the file
 			 * 	including the multiresolution object.
 			*/
-			LodStripsLibrary(const LodStripsLibraryData *, Mesh *geomesh, IndexData * userindexdata = NULL);
+			LodStripsLibrary(	const	LodStripsLibraryData *,
+												Mesh	*geomesh,
+												IndexData	*userindexdata = NULL);
 
 			/// Destructor.
@@ -184,11 +193,28 @@
 			uint32	MinVertices();
 
-			uint32 GetValidIndexCount(int submeshid) const { return indices_x_submesh[submeshid]; }
-//			uint32 GetValidOffset(int submeshid) const { return offsets_x_submesh[submeshid]; }
-			uint32 GetTotalStripCount(void) const { return mTotalStrips; }
-			uint32 GetSubMeshtripCount(int submeshid) const { return mStripsSubmesh[submeshid]; }
-			uint32 GetCurrentTriangleCount(void) const { return current_triangle_count; }
-
-			virtual Real GetCurrentLodFactor(void) const { return lodFactor; }
+			uint32 GetValidIndexCount(int submeshid)	const
+			{
+				return indices_x_submesh[submeshid];
+			}
+
+			uint32 GetTotalStripCount(void)	const
+			{
+				return mTotalStrips;
+			}
+
+			uint32 GetSubMeshtripCount(int submeshid)	const
+			{
+				return mStripsSubmesh[submeshid];
+			}
+
+			uint32 GetCurrentTriangleCount(void)	const
+			{
+				return current_triangle_count;
+			}
+
+			virtual Real GetCurrentLodFactor(void)	const
+			{
+				return lodFactor;
+			}
 	};
 }
Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp	(revision 1552)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp	(revision 1560)
@@ -18,40 +18,43 @@
 //	Constructor.
 //-----------------------------------------------------------------------------
-LodStripsLibrary::LodStripsLibrary(const LodStripsLibraryData *lodstripsdata, Mesh *geomesh, IndexData *userindexdata)
-//:dataRetrievalInterface(idfun?idfun:DefaultIndexDataCreator)
-{
-//	const	char	*name_of_file;
-
+LodStripsLibrary::LodStripsLibrary(	const LodStripsLibraryData	*lodstripsdata,
+																		Mesh												*geomesh,
+																		IndexData										*userindexdata)
+{
 	//	Sets the current lod.
 	mCurrentLod	=	0;
 
-	//	Converts a String to const char *.
-//	name_of_file	=	name.data();
-
 	//	Sets the global mesh.
 	mGeoMesh = geomesh;
 
-	delete_indexdata=false;
-	dataRetrievalInterface=userindexdata;
-	
-	indices_x_submesh = NULL;
-	offsets_x_submesh = NULL;
-	mStripsSubmesh = NULL;
-	submesh_x_strip = NULL;
-	lodFactor=1.0f;
-	current_triangle_count=0;
+	delete_indexdata				=	false;
+	dataRetrievalInterface	=	userindexdata;
+	indices_x_submesh				=	NULL;
+	offsets_x_submesh				=	NULL;
+	mStripsSubmesh					=	NULL;
+	submesh_x_strip					=	NULL;
+	lodFactor								=	1.0f;
+	current_triangle_count	=	0;
 	
 	//	Loads the Level Of Detail file.
 	LodStripsLibrary::LoadStripMesh(lodstripsdata,mGeoMesh);
 
-	GoToLod(0.0f);	
-	minFaces = 0;
+	GoToLod(0.0f);
+
+	minFaces	=	0;
+
 	for (unsigned int strip = 0; strip < mTotalStrips; strip++)
-		minFaces += int(mStrips[strip].size() - 2);
+	{
+		minFaces	+=	int(mStrips[strip].size() - 2);
+	}
 
 	GoToLod(1.0f);
-	maxFaces = 0;
+
+	maxFaces	=	0;
+
 	for (unsigned int strip = 0; strip < mTotalStrips; strip++)
-		maxFaces += int(mStrips[strip].size() - 2);
+	{
+		maxFaces	+=	int(mStrips[strip].size() - 2);
+	}
 }
 
@@ -668,24 +671,34 @@
 void LodStripsLibrary::UpdateDataRetrievalInterface(void)
 {
-	int	target_submesh	= 0;
-	size_t	strip_count	= 0;
-	unsigned int ii_submesh = 0;	
+	int						target_submesh	=	0;
+	size_t				strip_count			=	0;
+	unsigned int	ii_submesh			=	0;
+
 	current_triangle_count = 0;
 
 	// indices_x_submesh is calculated without degenerates, 
 	// we must add the degenerate indices added here
-	uint32 numdeg = mGeoMesh->mSubMesh[target_submesh].mStripCount*2 - 2;
-
-	dataRetrievalInterface->Begin(target_submesh, indices_x_submesh[target_submesh] + numdeg);
-	current_triangle_count += indices_x_submesh[target_submesh] + numdeg;
-
+	uint32 numdeg = mGeoMesh->mSubMesh[target_submesh].mStripCount * 2 - 2;
+
+	dataRetrievalInterface->Begin(target_submesh,
+																indices_x_submesh[target_submesh] + numdeg);
+
+	current_triangle_count	+=	indices_x_submesh[target_submesh] + numdeg;
+
+	//	For each strip.
 	for (unsigned int i = 0; i < mTotalStrips; i++, strip_count++)
 	{
 		if (strip_count >= mGeoMesh->mSubMesh[target_submesh].mStripCount)
 		{
-			if (target_submesh==0)
+			if (target_submesh == 0)
+			{
 				offsets_x_submesh[target_submesh] = 0;
+			}
 			else
-				offsets_x_submesh[target_submesh] = indices_x_submesh[target_submesh-1] + offsets_x_submesh[target_submesh-1];
+			{
+				offsets_x_submesh[target_submesh] = indices_x_submesh[target_submesh-1]
+																						+
+																						offsets_x_submesh[target_submesh-1];
+			}
 
 			mStripsSubmesh[target_submesh]	=	(int)strip_count;
@@ -695,22 +708,30 @@
 			ii_submesh = 0;
 			dataRetrievalInterface->End();
+
+			numdeg = mGeoMesh->mSubMesh[target_submesh].mStripCount*2 - 2;
+
+			dataRetrievalInterface->Begin(target_submesh,
+																		indices_x_submesh[target_submesh] + numdeg);
 			
-			numdeg = mGeoMesh->mSubMesh[target_submesh].mStripCount*2 - 2;
-			dataRetrievalInterface->Begin(target_submesh, indices_x_submesh[target_submesh] + numdeg);
-			current_triangle_count += indices_x_submesh[target_submesh] + numdeg;
-		}
-		
+			current_triangle_count	+=	indices_x_submesh[target_submesh] + numdeg;
+		}
+
 		int lastindex = -1;
-		for (SmallIntVector::iterator it=mStrips[i].begin(); it!=mStrips[i].end(); it++, ii_submesh++)
+
+		for (	SmallIntVector::iterator it	=	mStrips[i].begin();
+					it != mStrips[i].end();
+					it++, ii_submesh++)
 		{
 			// repeat the first index of the strip: degenerate (DEG!)
 			// except for the first strip in a mesh
-			if (lastindex==-1 && strip_count>0)
-			{
-				lastindex=*it;
+			if ((lastindex == -1) && (strip_count > 0))
+			{
+				lastindex	=	*it;
+
 				dataRetrievalInterface->SetIndex(ii_submesh,*it);				
 				ii_submesh++;
 			}
-			lastindex=*it;
+
+			lastindex	=	*it;
 			dataRetrievalInterface->SetIndex(ii_submesh,*it);
 		}
@@ -718,5 +739,5 @@
 		// repeat last vertex of the strip: degenerate (DEG!)
 		// except for the last strip in a mesh
-		if (strip_count<mGeoMesh->mSubMesh[target_submesh].mStripCount-1)
+		if (strip_count < mGeoMesh->mSubMesh[target_submesh].mStripCount-1)
 		{
 			dataRetrievalInterface->SetIndex(ii_submesh,lastindex);
@@ -727,11 +748,18 @@
 	if (strip_count >= mGeoMesh->mSubMesh[target_submesh].mStripCount)
 	{
-		if (target_submesh==0)
+		if (target_submesh == 0)
+		{
 			offsets_x_submesh[target_submesh] = 0;
+		}
 		else
-			offsets_x_submesh[target_submesh] = indices_x_submesh[target_submesh-1] + offsets_x_submesh[target_submesh-1];
-
-		mStripsSubmesh[target_submesh] = (int)strip_count;
-		strip_count = 0;
+		{
+			offsets_x_submesh[target_submesh] = indices_x_submesh[target_submesh-1]
+																					+
+																					offsets_x_submesh[target_submesh-1];
+		}
+
+		mStripsSubmesh[target_submesh]	=	(int)strip_count;
+		strip_count											=	0;
+
 		target_submesh++;
 	}
@@ -739,2 +767,3 @@
 	dataRetrievalInterface->End();
 }
+
Index: /GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.cpp	(revision 1526)
+++ /GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.cpp	(revision 1560)
@@ -769,5 +769,5 @@
 
 	//	Reserve memory for vert_info array.
-	vinfo.init(m.vertCount()*10);
+	vinfo.init(m.vertCount()*2);
 
 	if (simplif::will_use_vertex_constraint)
Index: /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp
===================================================================
--- /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp	(revision 1549)
+++ /GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp	(revision 1560)
@@ -1034,8 +1034,19 @@
 				else
 				{
+					//	Transform NoSV Mesh to a SV Mesh.
+					mesh_aux	=	mGeoMesh->toSharedVertex();
+
+					//	Deletes the mesh No Shared Vertex.
+					delete	mGeoMesh;
+
+					//	Gets the mesh Shared Vertex.
+					mGeoMesh	=	mesh_aux;
+
+					// Visualize mesh.
+					geoMeshView->setMesh(mGeoMesh);
+
 					//	Simplify the mesh object.
 					if(simplifyEdgeCollapse())
 					{
-						delete	mMeshSimplifier;
 						geoMeshView->restoreContext();
 					}
@@ -1056,5 +1067,6 @@
 				//	Simplify and generate simplification sequence.
 			case	LODTREES_AUTO:
-				if (idMeshLeaves==(unsigned short)-1)
+
+				if (idMeshLeaves == (unsigned short)-1)
 				{
 					fltk::alert("Leaves submesh not selected!");
@@ -1141,7 +1153,4 @@
 					if (simplifyEdgeCollapse())
 					{
-						//	Create the simplification sequence.
-						//createSimplificationSequence();
-						
 						//delete	mMeshSimplifier;
 						geoMeshView->restoreContext();
@@ -2600,5 +2609,4 @@
 					o->box(fltk::FLAT_BOX);
 					o->color((fltk::Color)0xffffff00);
-					//fltk::Group::current()->resizable(o);
 				}
 
@@ -2621,5 +2629,4 @@
 				{
 					fltk::Button* o;
-					//o = mButtonProcess = new fltk::Button(665, 410, 73, 25, "Process");
 					o = mButtonProcess = new fltk::Button(75, 410, 73, 25, "Process");
 					o->callback((fltk::Callback*)cb_mButtonProcess);
@@ -2630,5 +2637,4 @@
 				{
 					fltk::ProgressBar* o;
-					//o = mProcessBar = new fltk::ProgressBar(616, 435, 175, 18);
 					o = mProcessBar = new fltk::ProgressBar(16, 435, 195, 18);
 					o->hide();
@@ -2669,4 +2675,5 @@
 					fltk::Slider* o;
 					o = mLodStripSlider = new fltk::Slider(16, 50, 30, 450);
+					o->linesize(0.01f);
 					o->type(fltk::Slider::TICK_BELOW);
 					o->set_vertical();
@@ -2678,4 +2685,5 @@
 					fltk::Slider* o;
 					o = mLodTreeSlider = new fltk::Slider(46, 50, 30, 450);
+					o->linesize(0.01f);
 					o->type(fltk::Slider::TICK_BELOW);
 					o->set_vertical();
@@ -2706,6 +2714,4 @@
 				}
 
-				//mChangeVertices = new fltk::CheckButton(30, 104, 25, 25, "Change vertices");
-
 				{
 					mProcessTitle		= new fltk::Widget(0, 0, 230, 25, "");
@@ -2719,16 +2725,4 @@
 				}
 
-				/*
-					 {
-					 mTypeLabel			= new fltk::Output(26, 82, 5, 25, "Type");
-					 fltk::Output* o	=	mTypeLabel;
-					 o->set_vertical();
-					 o->box(fltk::NO_BOX);
-					 o->labelfont(fltk::HELVETICA_BOLD);
-					 o->color((fltk::Color)0xe0dfe300);
-					 o->align(fltk::ALIGN_RIGHT);
-					 }
-					 */
-
 				{
 					mMeshReductionLabel	= new fltk::Output(26, 124, 0, 25, "Mesh Reduction");
@@ -2741,6 +2735,4 @@
 				}
 
-				//mChangeTexture = new fltk::CheckButton(30, 104, 25, 25, "Change texture");
-
 				{
 					fltk::Group* o;
@@ -2815,9 +2807,4 @@
 				}
 
-				//{
-				//	fltk::Item* o = menuFileTransformSharedVertex = new fltk::Item("Transform to Shared Vertex");
-				//	o->callback((fltk::Callback*)cb_menuFileTransformSharedVertex);
-				//}
-
 				{
 					menuLoadTextures = new fltk::ItemGroup("Load Textures");
@@ -2862,9 +2849,4 @@
 				}
 
-				//{
-				//	fltk::Item* o = menuEditZoom = new fltk::Item("Zoom");
-				//	o->callback((fltk::Callback*)cb_menuEditZoom);
-				//}
-
 				new fltk::Divider();
 
@@ -2879,5 +2861,4 @@
 					o->callback((fltk::Callback*)cb_menuSelectLeaves);
 				}
-
 				o->end();
 			}
@@ -2900,12 +2881,8 @@
 				}
 
-				//new fltk::Divider();
-
 				{
 					fltk::Item* o = menuRenderCW = new fltk::Item("CW");
 					o->type(fltk::Item::RADIO);
 					o->callback((fltk::Callback*)cb_menuRenderCW);
-
-					//o->hide();
 				}
 
@@ -2915,6 +2892,4 @@
 					o->set_value();
 					o->callback((fltk::Callback*)cb_menuRenderCCW);
-
-					//o->hide();
 				}
 
@@ -2996,5 +2971,4 @@
 
 			//	Menu LodTrees.
-			
 			{
 				fltk::ItemGroup* o;
@@ -3029,13 +3003,4 @@
 			}
 
-/*			{
-				fltk::SharedImage *gifLogo = logo->get("media\\logos\\logo.gif");
-				
-				//o->callback((fltk::Callback*)cb_mLogo);
-				
-				mLogo	=	new fltk::InvisibleBox(406, 1, 43, 13);				
-				mLogo->image(gifLogo);
-			}*/
-
 			o->end();
 		}
@@ -3046,14 +3011,4 @@
 			o->box(fltk::BORDER_BOX);
 			o->begin();
-
-			/*
-			{
-				fltk::Widget* o;
-				o = mFPS = new fltk::Widget(10, 4, 30, 15, "FPS ");
-				o->box(fltk::NO_BOX);
-				o->labelfont(fltk::HELVETICA_BOLD);
-				o->color((fltk::Color)0xe0dfe300);
-			}
-			*/
 
 			{
@@ -3071,7 +3026,4 @@
 				o->labelfont(fltk::HELVETICA_BOLD);
 				o->color((fltk::Color)0xe0dfe300);
-
-				//	Hide triangle count.
-				//o->hide();
 			}
 
@@ -3083,12 +3035,4 @@
 				o->color((fltk::Color)0xe0dfe300);
 			}
-
-			//{
-			//	fltk::Widget* o;
-			//	o = mQuads = new fltk::Widget(454, 4, 40, 15, "Quads");
-			//	o->box(fltk::NO_BOX);
-			//	o->labelfont(fltk::HELVETICA_BOLD);
-			//	o->color((fltk::Color)0xe0dfe300);
-			//}
 
 			{
@@ -3101,6 +3045,4 @@
 			o->end();
 		}
-
-
 		o->end();
 	}
@@ -3108,5 +3050,4 @@
 	fltk::focus(geoMeshView);
 	
-
 	/*Hide Right Panel*/
 	hideRightPanel();
