Changeset 831 for GTP/trunk/Lib/Geom/shared/GTGeometry/src
- Timestamp:
- 04/26/06 18:17:10 (19 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared/GTGeometry/src
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp
r829 r831 2 2 #include <assert.h> 3 3 #include "GeoLodTreeLibrary.h" 4 //#include "ArbolesInma/Arbol.h"5 //#include "ArbolesInma/Foliage.h"4 #include "libs/leaves/arbol.h" 5 #include "libs/leaves/Foliage.h" 6 6 7 7 using namespace Geometry; … … 10 10 11 11 Geometry::LodTreeLibrary::LodTreeLibrary(std::string trunkSimpSeqFile, 12 Geometry::Mesh *treeGeoMesh 13 /*, 12 Geometry::Mesh *treeGeoMesh, 14 13 std::string foliage_verts, 15 14 std::string foliage_leafs, 16 std::string foliage_simpl ,15 std::string foliage_simpl/*, 17 16 uint32 leafSubMeshID, 18 17 CREATEVERTEXDATAFUNC vdfun, … … 23 22 24 23 // Cargar el tronco 25 /* trunk=new LodStrip(vdfun,midfun);26 trunk->ED_NUEVA=1;27 trunk->RESVARIABLE=0;28 trunk->MODOTEST=0; //0: No test 1: plano 2: esfera29 trunk->bTextures=0;30 if (trunk->RecuperarModeloEFFICIENT((char*)trunkfile.c_str())==0)31 throw FileNotFound(trunkfile);32 33 // trunk->LodsDisp=(int) (trunk->cVerts.size()*0.99);34 trunk->LodsDisp=(int) (trunk->TOTALCAMBIOS*0.95);35 trunk->CopiarVectors2ArraysNUEVAED();36 trunk->LodActual=0;37 trunk->CalculaNormalesVertice();*/38 39 24 trunk = new LodStripsLibrary(trunkSimpSeqFile,treeGeoMesh); 40 25 41 26 // Cargar la copa del árbol 42 /* arbol = new Arbol(foliage_verts.c_str(),foliage_leafs.c_str(),foliage_simpl.c_str(),vdfun,idfun); 43 foliage = new Foliage(arbol);*/ 44 27 arbol = new Arbol(foliage_verts.c_str(),foliage_leafs.c_str(),foliage_simpl.c_str(),NULL/*vdfun*/,NULL/*idfun*/); 28 foliage = new Foliage(arbol); 45 29 } 46 30 /* … … 66 50 { 67 51 if (trunk) delete trunk; 68 //if (arbol) delete arbol;69 //if (foliage) delete foliage;52 if (arbol) delete arbol; 53 if (foliage) delete foliage; 70 54 /* if (trunk_all_indices) delete trunk_all_indices; 71 55 if (indices_offsets) delete[] indices_offsets; … … 117 101 } 118 102 119 /* 103 120 104 uint32 LodTreeLibrary::GoToFoliageLod(uint32 newlod) 121 105 { … … 174 158 return arbol->nHojas; 175 159 } 176 */ 160 177 161 /*const VertexData* LodTreeLibrary::Get_Trunk_VertexData(void) const 178 162 { … … 191 175 return arbol->vertexdata; 192 176 } 193 177 */ 194 178 const IndexData* LodTreeLibrary::CurrentLOD_Foliage_Indices(void) const 195 179 { 196 180 // return current_foliage_indices; 197 181 return arbol->indexdata; 198 } */182 } 199 183 200 184 … … 203 187 throw Geometry::FileNotFound(text); 204 188 }*/ 205 /* 189 206 190 uint32 LodTreeLibrary::CurrentLOD_Foliage_IndexCount(void) const 207 191 { … … 209 193 return arbol->indexdata->GetNumValidIndices(); 210 194 } 211 195 /* 212 196 uint32 LodTreeLibrary::Get_Trunk_VertexCount(void) const 213 197 { … … 224 208 { 225 209 return arbol->vertexdata->GetNumVertices(); 226 } 210 }*/ 227 211 uint32 LodTreeLibrary::Get_Foliage_MaxIndexCount(void) const 228 212 { 229 213 return arbol->indexdata->GetNumMaxIndices(); 230 214 } 231 */ -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/leaves/Arbol.cpp
r830 r831 1 #include <GL\glut.h>2 1 #include <stdio.h> 3 2 #include <string.h> 4 3 #include <math.h> 5 4 #include "Arbol.h" 6 #include "../defs.h" 7 8 //-------------------------------------------------------------------------------------------------------------------------------- 9 // Void constructor 10 // Parameters --> None 11 //-------------------------------------------------------------------------------------------------------------------------------- 12 /*Arbol::Arbol(void): Vertices(NULL), Hojas(NULL) 13 { 14 cx = cy= cz=0; 15 }*/ 5 16 6 //-------------------------------------------------------------------------------------------------------------------------------- 17 7 // Constructor with the name of a file cotaining the data … … 51 41 52 42 //VERTICES 53 if ((TotVerts=LeeVertices(arbol))==0) 54 if ((nHojas = LeoHojas (hojas))==0) ThrowFileNotFoundError((const char*)hojas);43 if ((TotVerts=LeeVertices(arbol))==0){ printf("File not found '%s'\n",arbol); exit(1); }//ThrowFileNotFoundError((const char*)arbol); 44 if ((nHojas = LeoHojas (hojas))==0) { printf("File not found '%s'\n",hojas); exit(1); }//ThrowFileNotFoundError((const char*)hojas); 55 45 // TotTronco = LeoTronco (tronco); 56 46 // CalculaNormalesVertice(); 57 if ((TotHojas = LeoHojasSimpl(simpli))==0) ThrowFileNotFoundError((const char*)simpli);47 if ((TotHojas = LeoHojasSimpl(simpli))==0){ printf("File not found '%s'\n",simpli); exit(1); }// ThrowFileNotFoundError((const char*)simpli); 58 48 RellenoRaiz(); 59 49
Note: See TracChangeset
for help on using the changeset viewer.