Index: GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h	(revision 1014)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h	(revision 1018)
@@ -16,4 +16,5 @@
 #include	<vector>
 #include	<time.h>
+#include	"VertexData.h"
 
 namespace Geometry
@@ -124,13 +125,19 @@
 			void	LoadStripMesh(char *name, Mesh *geomesh);
 
-		public:
+			Geometry::CREATEMULTIINDEXDATAFUNC create_multi_index_data_func;
 
 			//	Strips vector.
 			SmallIntVector	*mStrips;
+
+			void UpdateDataRetrievalInterface(void);
+
+		public:
+
+			MultiIndexData *dataRetrievalInterface;
 			
 			/**	Constructor, receives as a parameter the name of the file
 			 * 	including the multiresolution object.
 			*/
-			LodStripsLibrary(std::string, Mesh *geomesh);
+			LodStripsLibrary(std::string, Mesh *geomesh, CREATEMULTIINDEXDATAFUNC midfun=NULL);
 
 			/// Destructor.
@@ -154,5 +161,5 @@
 			/// Establishes the new LOD range.
 			/// Only the LODs in that range are stored and used.
-			void		TrimByLod(uint32, uint32);
+			void	TrimByLod(uint32, uint32);
 
 			/// Returns the number of triangles of the highest LOD.
@@ -168,7 +175,7 @@
 			uint32	MinVertices();
 
-			//	(New)	Get the number of strips.
+/*			//	(New)	Get the number of strips.
 			uint32	GetStripCount() const;
-			uint32  GetIndexCountByStrip(uint32) const;
+			uint32  GetIndexCountByStrip(uint32) const;*/
 	};
 }
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodTreeLibrary.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodTreeLibrary.h	(revision 895)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodTreeLibrary.h	(revision 1018)
@@ -50,6 +50,6 @@
 //		uint32 CurrentLOD_Trunk_IndexCount(void) const;
 		uint32 CurrentLOD_Trunk_IndexCountByStrip(uint32 istrip) const;
-/*		const VertexData* Get_Trunk_VertexData(void) const;
-//		const MultiIndexData* CurrentLOD_Trunk_Indices(void) const;*/
+/*		const VertexData* Get_Trunk_VertexData(void) const;*/
+		const MultiIndexData* CurrentLOD_Trunk_Indices(void) const;
 
 //		uint32 Get_Foliage_VertexCount(void) const;
@@ -62,5 +62,5 @@
 //		unsigned int *indices_offsets;
 
-		const Geometry::SmallIntVector & GetStrip(uint32 istrip) const { return trunk->mStrips[istrip]; }
+//		const Geometry::SmallIntVector & GetStrip(uint32 istrip) const { return trunk->mStrips[istrip]; }
 
 	private:
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsConstructor.h
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsConstructor.h	(revision 1017)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsConstructor.h	(revision 1018)
@@ -85,6 +85,6 @@
 			int		NumVertsRepetidos;
 
-			ObjList<tipoVertice>	cVerts;
-			ObjList<ObjList<int> > cStrips;
+			std::vector<tipoVertice>	cVerts;
+			std::vector<std::vector<int> > cStrips;
 
 			VECTORINT *lStripsV;
@@ -92,5 +92,5 @@
 			tipoVertice *vVerts;
 
-			ObjList<tipoOrden> Ordenacion;
+			std::vector<tipoOrden> Ordenacion;
 
 			uint32 *pCurrentData;
@@ -98,7 +98,7 @@
 			LODData *vCambios;
 			//vector <LODData> cCambios;
-			ObjList<LODData> cCambios;
+			std::vector<LODData> cCambios;
 			//VECTORUNINT cDatos;
-			ObjList<int32> cDatos;
+			std::vector<int32> cDatos;
 			uint32 *vDatos;
 
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp	(revision 1014)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp	(revision 1018)
@@ -17,6 +17,6 @@
 //	Constructors.
 //-----------------------------------------------------------------------------
-LodStripsLibrary::LodStripsLibrary(	std::string	name,
-																		Mesh				*geomesh)
+LodStripsLibrary::LodStripsLibrary(	std::string	name, Mesh *geomesh, CREATEMULTIINDEXDATAFUNC midfun)
+:create_multi_index_data_func(midfun?midfun:DefaultMultiIndexDataCreator)
 {
 	const	char	*name_of_file;
@@ -30,4 +30,6 @@
 	//	Sets the global mesh.
 	mGeoMesh = geomesh;
+
+	dataRetrievalInterface=NULL;
 	
 	//	Loads the Level Of Detail file.
@@ -41,4 +43,6 @@
 {
 	delete	[] mStrips;
+	if (dataRetrievalInterface)
+		delete dataRetrievalInterface;
 }
 
@@ -220,4 +224,5 @@
 	}
 
+	UpdateDataRetrievalInterface();
 	return	return_value;
 }
@@ -321,5 +326,5 @@
 	mMaxLod	=	maxLod;
 }
-
+/*
 //-----------------------------------------------------------------------------
 //	Get strip count.
@@ -337,5 +342,5 @@
 	return (uint32)	mStrips[istrip].size();
 }
-
+*/
 //-----------------------------------------------------------------------------
 //	Private.
@@ -364,14 +369,11 @@
 	max					=	0;
 	mTotalFaces	=	0;
-	
+
+	unsigned int * strip_sizes = new unsigned int[mFileStrips.size()];
 	for (i = 0; i < mFileStrips.size(); i++)
 	{
-		t	=	int(mFileStrips[i].size());
-		
+		strip_sizes[i] = t = int(mFileStrips[i].size());
 		if (t>max)
-		{
 			max	=	t;
-		}
-
 		mTotalFaces	+=	t - 2;
 	}
@@ -388,4 +390,6 @@
 	
 	//	Copy strips.
+	dataRetrievalInterface=create_multi_index_data_func(mFileStrips.size(),strip_sizes);
+	dataRetrievalInterface->Begin();
 	for (i = 0; i < mFileStrips.size(); i++)
 	{
@@ -393,4 +397,5 @@
 		{
 			mStrips[i].push_back(mFileStrips[i][j]);
+			dataRetrievalInterface->SetIndex(i,j,mFileStrips[i][j]);
 		}
 		
@@ -398,4 +403,5 @@
 		mStripsChanges[i]	=	0;
 	}
+	dataRetrievalInterface->End();
 
 	for (i = 0; i < mData.size(); i++)
@@ -411,4 +417,6 @@
 		mVertex[i]	=	mFileVertices[i];
 	}
+
+	delete[] strip_sizes;
 }
 
@@ -435,4 +443,6 @@
 	SubMesh														*geoSubMesh;
 
+
+
 	//	For each one of the submeshes.
 	for (unsigned int submesh	=	0; submesh < geomesh->mSubMeshCount; submesh++)
@@ -563,2 +573,15 @@
 }
 
+
+void LodStripsLibrary::UpdateDataRetrievalInterface(void)
+{
+	dataRetrievalInterface->Begin();
+	for (int i=0; i<mTotalStrips; i++)
+	{
+		unsigned int j=0;
+		for (SmallIntVector::iterator it=mStrips[i].begin(); it!=mStrips[i].end(); it++, j++)
+			dataRetrievalInterface->SetIndex(i,j,*it);
+		dataRetrievalInterface->SetNumValidIndices(i,j);
+	}
+	dataRetrievalInterface->End();
+}
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp	(revision 985)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp	(revision 1018)
@@ -65,5 +65,5 @@
 	assert(trunk);
 //	return trunk->TOTALTIRAS;
-	return trunk->GetStripCount();
+	return trunk->dataRetrievalInterface->GetNumPrims();
 }
 
@@ -73,5 +73,6 @@
 	assert(trunk);
 //	return trunk->lStripsV[istrip].size();
-	return trunk->GetIndexCountByStrip(istrip);
+//	return trunk->GetIndexCountByStrip(istrip);
+	return trunk->dataRetrievalInterface->GetNumValidIndices(istrip);
 }
 /*
@@ -168,11 +169,11 @@
 { 
 	return trunk->vertices; 
-}
+}*/
 const MultiIndexData* LodTreeLibrary::CurrentLOD_Trunk_Indices(void) const 
 { 
 //	return (uint32*)trunk->vStrips[istrip]; 
 //	return trunk->indices_x_tira[istrip];
-	return trunk->indices;
-}*/
+	return trunk->dataRetrievalInterface;
+}
 
 
Index: GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp	(revision 1017)
+++ GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp	(revision 1018)
@@ -42,8 +42,8 @@
 	long 		int							totalRegs	=	0;
 	long 		int							RegsCambios;
-	ObjList<ObjList<int> >			TiraOriginal;
+	std::vector<std::vector<int> >			TiraOriginal;
 	LODData 								regLOD;
 	//LODChanges							listaCambios;
-	ObjList<LODData>						listaCambios;
+	std::vector<LODData>						listaCambios;
 	float										percent;
 	float										increment;
@@ -89,5 +89,5 @@
 		{
 
-			ObjList<int> & cStripsT = this->cStrips[t];
+			std::vector<int> & cStripsT = this->cStrips[t];
 
 			//	Initialize.
@@ -138,6 +138,6 @@
 					}
 					
-					cStripsT.eraseAtPos(i);
-					//this->cStrips[t].erase(this->cStrips[t].begin()+i);
+					//cStripsT.eraseAtPos(i);
+					cStripsT.erase(this->cStrips[t].begin()+i);
 					i--;
 					r++;
@@ -198,8 +198,8 @@
 					}
 					
-					cStripsT.eraseAtPos(i);
-					//this->cStrips[t].erase(this->cStrips[t].begin()+i);
-					cStripsT.eraseAtPos(i);
-					//this->cStrips[t].erase(this->cStrips[t].begin()+i);
+					//cStripsT.eraseAtPos(i);
+					cStripsT.erase(this->cStrips[t].begin()+i);
+					//cStripsT.eraseAtPos(i);
+					cStripsT.erase(this->cStrips[t].begin()+i);
 					r++;
 					
@@ -274,9 +274,9 @@
 	long int k;
 	VECTORVERTEX				Vertices;
-	ObjList<tipoVertice>		NuevosVerts;
+	std::vector<tipoVertice>		NuevosVerts;
 	//vector	<VECTORINT>	NuevasTiras;
-	ObjList<ObjList<int> > NuevasTiras;
+	std::vector<std::vector<int> > NuevasTiras;
 //	VECTORINT						tira;
-	ObjList<int> tira;
+	std::vector<int> tira;
 	vector	<Index>			mV1Aux;
 	tipoOrden						Orden;
@@ -480,6 +480,6 @@
 		for(t = 0; t < cStrips.size(); t++)
 		{
-			ObjList<int> & thisStrip = cStrips[t];			
-			ObjList<int> & NuevasTirasT = NuevasTiras[t];
+			std::vector<int> & thisStrip = cStrips[t];			
+			std::vector<int> & NuevasTirasT = NuevasTiras[t];
 			int cStripsSizeT = thisStrip.size();
 			for(i = 0; i < cStripsSizeT; i++)
@@ -975,5 +975,5 @@
 {
 	tipoVertice	vAux;
-	ObjList<int>		tira;
+	std::vector<int>		tira;
 	size_t			i;
 	size_t			j;
Index: GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp
===================================================================
--- GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp	(revision 998)
+++ GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp	(revision 1018)
@@ -592,7 +592,10 @@
 		
 	//	For each strip.
-	for (int strip	=	0; strip < lodStripsLib->GetStripCount(); strip++)
-	{
-		triangle_count	+=	lodStripsLib->mStrips[strip].size() - 2;
+//	for (int strip	=	0; strip < lodStripsLib->GetStripCount(); strip++)
+	MultiIndexData *dataInterface = lodStripsLib->dataRetrievalInterface;
+	for (int strip	=	0; strip < dataInterface->GetNumPrims(); strip++)
+	{
+//		triangle_count	+=	lodStripsLib->mStrips[strip].size() - 2;
+		triangle_count	+=	dataInterface->GetNumValidIndices(strip) - 2;
 	}
 
@@ -928,7 +931,9 @@
 
 			//	For each index of the strip.
-			for (int index = 0; index < lodStripsLib->mStrips[current_strip].size(); index++)
+//			for (int index = 0; index < lodStripsLib->mStrips[current_strip].size(); index++)
+			for (int index = 0; index < lodStripsLib->dataRetrievalInterface->GetNumValidIndices(current_strip); index++)
 			{
-				position	=	lodStripsLib->mStrips[current_strip][index];
+//				position	=	lodStripsLib->mStrips[current_strip][index];
+				position	=	lodStripsLib->dataRetrievalInterface->GetIndex(current_strip,index);
 
 				//	Gets the vertex normal.
@@ -1028,7 +1033,9 @@
 
 			//	For each index of the strip.
-			for (int index = 0; index < lodTreeLib->GetStrip(current_strip).size(); index++)
+//			for (int index = 0; index < lodTreeLib->GetStrip(current_strip).size(); index++)
+			for (int index = 0; index < lodTreeLib->CurrentLOD_Trunk_IndexCountByStrip(current_strip); index++)
 			{
-				position	=	lodTreeLib->GetStrip(current_strip)[index];
+//				position	=	lodTreeLib->GetStrip(current_strip)[index];
+				position = lodTreeLib->CurrentLOD_Trunk_Indices()->GetIndex(current_strip,index);
 
 				//	Gets the vertex normal.
