Changeset 831


Ignore:
Timestamp:
04/26/06 18:17:10 (18 years ago)
Author:
gumbau
Message:
 
Location:
GTP/trunk/Lib/Geom/shared/GTGeometry
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GTGeometry/GTGeometry.vcproj

    r829 r831  
    256256                                </File> 
    257257                        </Filter> 
     258                        <Filter 
     259                                Name="leaves" 
     260                                Filter=""> 
     261                                <File 
     262                                        RelativePath=".\src\libs\leaves\activas.cpp"> 
     263                                </File> 
     264                                <File 
     265                                        RelativePath=".\src\libs\leaves\Arbol.cpp"> 
     266                                </File> 
     267                                <File 
     268                                        RelativePath=".\src\libs\leaves\foliage.cpp"> 
     269                                </File> 
     270                                <File 
     271                                        RelativePath=".\src\libs\leaves\Hoja.cpp"> 
     272                                        <FileConfiguration 
     273                                                Name="Debug|Win32"> 
     274                                                <Tool 
     275                                                        Name="VCCLCompilerTool" 
     276                                                        ObjectFile="$(IntDir)/$(InputName)1.obj"/> 
     277                                        </FileConfiguration> 
     278                                        <FileConfiguration 
     279                                                Name="Release|Win32"> 
     280                                                <Tool 
     281                                                        Name="VCCLCompilerTool" 
     282                                                        ObjectFile="$(IntDir)/$(InputName)1.obj"/> 
     283                                        </FileConfiguration> 
     284                                </File> 
     285                                <File 
     286                                        RelativePath=".\src\libs\leaves\Point3D.cpp"> 
     287                                </File> 
     288                                <File 
     289                                        RelativePath=".\src\libs\leaves\VertexData.cpp"> 
     290                                </File> 
     291                        </Filter> 
    258292                </Filter> 
    259293                <Filter 
     
    262296                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 
    263297                        <File 
     298                                RelativePath=".\src\libs\leaves\activas.h"> 
     299                        </File> 
     300                        <File 
    264301                                RelativePath=".\src\libs\AdjModel.cxx"> 
    265302                        </File> 
     
    274311                        </File> 
    275312                        <File 
     313                                RelativePath=".\src\libs\leaves\arbol.h"> 
     314                        </File> 
     315                        <File 
    276316                                RelativePath=".\src\libs\auxiliar.h"> 
    277317                        </File> 
     
    283323                        </File> 
    284324                        <File 
     325                                RelativePath=".\src\libs\leaves\foliage.h"> 
     326                        </File> 
     327                        <File 
    285328                                RelativePath=".\src\libs\GeoBase.h"> 
    286329                        </File> 
     
    334377                        </File> 
    335378                        <File 
     379                                RelativePath=".\src\libs\leaves\hoja.h"> 
     380                        </File> 
     381                        <File 
    336382                                RelativePath=".\include\hoja.h"> 
    337383                        </File> 
     
    340386                        </File> 
    341387                        <File 
     388                                RelativePath=".\src\libs\leaves\Point3D.h"> 
     389                        </File> 
     390                        <File 
    342391                                RelativePath=".\src\libs\detail\policy.h"> 
    343392                        </File> 
     
    355404                        </File> 
    356405                        <File 
     406                                RelativePath=".\src\libs\leaves\tlista.h"> 
     407                        </File> 
     408                        <File 
     409                                RelativePath=".\src\libs\leaves\TMatrix.h"> 
     410                        </File> 
     411                        <File 
    357412                                RelativePath=".\src\libs\tri_stripper.h"> 
     413                        </File> 
     414                        <File 
     415                                RelativePath=".\src\libs\leaves\Vector.h"> 
     416                        </File> 
     417                        <File 
     418                                RelativePath=".\include\VertexData.h"> 
    358419                        </File> 
    359420                        <Filter 
  • GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodTreeLibrary.h

    r829 r831  
    99#include "GeoLodStripsLibrary.h" 
    1010 
    11 /*class LodStrip; 
    1211class Arbol; 
    1312class Foliage; 
    1413class Point3D; 
    15 */ 
     14 
    1615namespace Geometry 
    1716{        
     17        class IndexData; 
    1818        class LodTreeLibrary 
    1919        { 
     
    2222                LodTreeLibrary(LodTreeLibrary*);*/ 
    2323                LodTreeLibrary( std::string trunkSimpSeqFile, 
    24                                                 Geometry::Mesh *treeGeoMesh 
    25                                                 /*, 
     24                                                Geometry::Mesh *treeGeoMesh, 
    2625                                                std::string foliage_verts, 
    2726                                                std::string foliage_leafs, 
    28                                                 std::string foliage_simpl, 
     27                                                std::string foliage_simpl/*, 
    2928                                                uint32 leafSubMeshID, 
    3029                                                CREATEVERTEXDATAFUNC vdfun=NULL,  
     
    3837                uint32 MinTrunkLod(void) const; 
    3938                uint32 MaxTrunkLod(void) const; 
    40 /*              uint32 GoToFoliageLod(uint32 newlod); 
     39                uint32 GoToFoliageLod(uint32 newlod); 
    4140                uint32 MinFoliageLod(void) const; 
    42                 uint32 MaxFoliageLod(void) const;*/ 
     41                uint32 MaxFoliageLod(void) const; 
    4342 
    4443                // funciones nuevas propuestas 
     
    5251 
    5352//              uint32 Get_Foliage_VertexCount(void) const; 
    54 //              uint32 Get_Foliage_MaxIndexCount(void) const; 
    55 //              uint32 CurrentLOD_Foliage_IndexCount(void) const; 
    56 /*              const IndexData* CurrentLOD_Foliage_Indices(void) const; 
    57                 const VertexData* Get_Foliage_VertexData(void) const; 
     53                uint32 Get_Foliage_MaxIndexCount(void) const; 
     54                uint32 CurrentLOD_Foliage_IndexCount(void) const; 
     55                const IndexData* CurrentLOD_Foliage_Indices(void) const; 
     56/*              const VertexData* Get_Foliage_VertexData(void) const; 
    5857*/ 
    5958//              Geometry::IndexData *trunk_all_indices; 
     
    6564                uint32 uniqueID; 
    6665                Geometry::LodStripsLibrary *trunk; 
    67 //              Arbol *arbol; 
    68 //              Foliage *foliage; 
     66                Arbol *arbol; 
     67                Foliage *foliage; 
    6968 
    7069        }; 
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp

    r829 r831  
    22#include <assert.h> 
    33#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" 
    66 
    77using namespace Geometry; 
     
    1010 
    1111Geometry::LodTreeLibrary::LodTreeLibrary(std::string trunkSimpSeqFile, 
    12                                                            Geometry::Mesh *treeGeoMesh  
    13                                                            /*, 
     12                                                           Geometry::Mesh *treeGeoMesh, 
    1413                                                           std::string foliage_verts,  
    1514                                                           std::string foliage_leafs,  
    16                                                            std::string foliage_simpl, 
     15                                                           std::string foliage_simpl/*, 
    1716                                                           uint32 leafSubMeshID, 
    1817                                                           CREATEVERTEXDATAFUNC vdfun, 
     
    2322 
    2423        // 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: esfera 
    29         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  
    3924        trunk = new LodStripsLibrary(trunkSimpSeqFile,treeGeoMesh); 
    4025 
    4126        // 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); 
    4529} 
    4630/* 
     
    6650{ 
    6751        if (trunk) delete trunk; 
    68 //      if (arbol) delete arbol; 
    69 //      if (foliage) delete foliage; 
     52        if (arbol) delete arbol; 
     53        if (foliage) delete foliage; 
    7054/*      if (trunk_all_indices) delete trunk_all_indices; 
    7155        if (indices_offsets) delete[] indices_offsets; 
     
    117101} 
    118102 
    119 /* 
     103 
    120104uint32 LodTreeLibrary::GoToFoliageLod(uint32 newlod) 
    121105{ 
     
    174158        return arbol->nHojas; 
    175159} 
    176 */ 
     160 
    177161/*const VertexData* LodTreeLibrary::Get_Trunk_VertexData(void) const  
    178162{  
     
    191175        return arbol->vertexdata; 
    192176} 
    193  
     177*/ 
    194178const IndexData* LodTreeLibrary::CurrentLOD_Foliage_Indices(void) const 
    195179{ 
    196180//      return current_foliage_indices; 
    197181        return arbol->indexdata; 
    198 }*/ 
     182} 
    199183 
    200184 
     
    203187        throw Geometry::FileNotFound(text); 
    204188}*/ 
    205 /* 
     189 
    206190uint32 LodTreeLibrary::CurrentLOD_Foliage_IndexCount(void) const 
    207191{ 
     
    209193        return arbol->indexdata->GetNumValidIndices(); 
    210194} 
    211  
     195/* 
    212196uint32 LodTreeLibrary::Get_Trunk_VertexCount(void) const 
    213197{ 
     
    224208{ 
    225209        return arbol->vertexdata->GetNumVertices(); 
    226 } 
     210}*/ 
    227211uint32 LodTreeLibrary::Get_Foliage_MaxIndexCount(void) const 
    228212{ 
    229213        return arbol->indexdata->GetNumMaxIndices(); 
    230214} 
    231 */ 
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/leaves/Arbol.cpp

    r830 r831  
    1 #include <GL\glut.h> 
    21#include <stdio.h> 
    32#include <string.h> 
    43#include <math.h> 
    54#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 
    166//-------------------------------------------------------------------------------------------------------------------------------- 
    177// Constructor with the name of a file cotaining the data 
     
    5141             
    5242        //VERTICES 
    53         if ((TotVerts=LeeVertices(arbol))==0) ThrowFileNotFoundError((const char*)arbol); 
    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); 
    5545//      TotTronco = LeoTronco (tronco); 
    5646//      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);    
    5848        RellenoRaiz(); 
    5949 
Note: See TracChangeset for help on using the changeset viewer.