Index: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGCluster2d.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGCluster2d.cpp	(revision 699)
+++ GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGCluster2d.cpp	(revision 721)
@@ -1,113 +1,56 @@
 
-#include "IMGCluster2d.h"
-#include "IMGCluster.h"
+#include <IMGCluster2d.h>
+#include <IMGCluster.h>
 
-namespace IMG {
+namespace IMG 
+{
 
-//* Create a 2d polygon from a polygon 3d. The projecte polygon is belong the dominant normal.
+Cluster2d::Cluster2d() 
+{
+    Vector3s = NULL;
+    cluster =NULL;
+    normal = NULL;
+}
+
+Ogre::Vector2 * Cluster2d::GetVector3s()
+{ 
+	return Vector3s; 
+}
+
+std::vector<Ogre::Vector2> * Cluster2d::GetVector3sVector() 
+{ 
+	return &Vector3s2_vector; 
+} 
+
+Ogre::Vector3 * Cluster2d::GetNormal() 
+{ 
+	return normal; 
+}
+
+//* Create a 2d polygon from a polygon 3d. The projecte polygon is belong the dominant ERROR_MSG.
 //			
 //	 
-int Cluster2d::Create2d(Cluster * cluster, int type, int type_vertexs) {
-	if (!cluster) return false;
+int Cluster2d::Create2d(Cluster * cluster, int type, int type_vertexs) 
+{
+	if (!cluster)
+	{
+		return false;
+	}
 	
 	int axis = cluster->AxisProjected();
-	Ogre::Vector3 *vertexs3d;
-	std::vector<Ogre::Vector3> vertexs3d_;
-	int num_vertexs = 4;
-	
-	//printf("\nDins Create cluster2d axisproj: %d ", axis);
-	
-	
-	
-	switch(type)
-	{
-		//case 0:	vertexs3d = poly->GetVector3s(); break;
-		case 0:	vertexs3d_ = *cluster->GetVector3sVector(); break;		
-		//case 1: vertexs3d = poly->GetVector3sTex(); break;
-	}
-	/*
-	if (type_vertexs) num_vertexs = 3;
-	else num_vertexs = 4;
-	*/
+
 	this->cluster = cluster;
-	
-	//Vector2 * vertexs2d = new Vector2[4];
-	// GametoolsError -- Isma 17/08/2005
-	//vertexs = new Vector2[4];
-	//vertexs = new Vector2[vertexs3d_.size()];
-	
-	//normal = new Vector2;
-	normal = new Ogre::Vector3;
-	Ogre::Vector3 *normal3d = cluster->GetPlane()->GetNormal();
-	Ogre::Box bound;
-	
-	
-	switch(axis)
-	{
-		case (0):
-			for (int i = 0; i < vertexs3d_.size(); i++)
-			{	
-				// GametoolsError -- Isma 17/08/2005
-				//vertexs[i].x = vertexs3d_[i].z;
-				//vertexs[i].y = vertexs3d_[i].y;
-				//vertexs2_vector.push_back(vertexs[i]);
 
-				//printf("Assignat 0: (%.4f, %.4f)- (%.4f, %.4f)\n", vertexs3d_[i].z, vertexs3d_[i].y, vertexs[i].x, vertexs[i].y);
-				//bound.AddBoundingVector3 (vertexs[i].x, vertexs[i].y, 0);		
-	
-			}
-			break;					
-		
-		  case (1):
-
-			
-			for (int i = 0; i < vertexs3d_.size(); i++)
-			{
-				// GametoolsError -- Isma 17/08/2005
-				//vertexs[i].x = vertexs3d_[i].x;
-				//vertexs[i].y = vertexs3d_[i].z;
-				//vertexs2_vector.push_back(vertexs[i]);
-				//printf("Assignat 1: (%.4f, %.4f)- (%.4f, %.4f)\n", vertexs3d_[i].x, vertexs3d_[i].z, vertexs[i].x, vertexs[i].y);
-				//bound.AddBoundingVector3 (vertexs[i].x, vertexs[i].y, 0);	
-			}
-			
-			break;
-
-		case(2):
-			for (int i = 0; i < vertexs3d_.size(); i++)
-			{
-				// GametoolsError -- Isma 17/08/2005
-				//vertexs[i].x = vertexs3d_[i].x;
-				//vertexs[i].y = vertexs3d_[i].y;
-				//vertexs2_vector.push_back(vertexs[i]);
-				//printf("Assignat 2: (%.4f, %.4f)- (%.4f, %.4f)\n", vertexs3d_[i].x, vertexs3d_[i].y, vertexs[i].x, vertexs[i].y);
-				//bound.AddBoundingVector3 (vertexs[i].x, vertexs[i].y, 0);	
-			}
-		
-		break;
-	}
-
-	
-	id = cluster->GetId();
-	//printf("\n\nen 2d: ");
-	//Print();
-	//printf("\n-----------------");
 	return axis;
 }
 
-void Cluster2d::Print() {
+void Cluster2d::Print() 
+{
 	printf("\nPrintant cluster2d: %d", id);
-	// GametoolsError -- Isma 17/08/2005
-	//if (!vertexs) return;
-	
-	//printf("\nVector3 1 (%.4f, %.4f)  ", vertexs[0].x, vertexs[0].y);
-	//printf("\nVector3 2 (%.4f, %.4f)  ", vertexs[1].x, vertexs[1].y);
-	//printf("\nVector3 3 (%.4f, %.4f)  ", vertexs[2].x, vertexs[2].y);	
-	//printf("\nVector3 3 (%.4f, %.4f)  ", vertexs[3].x, vertexs[3].y);	
 }
 
-Cluster2d::~Cluster2d() {
+Cluster2d::~Cluster2d() 
+{
 }
 
-
 }
