Changeset 1090 for GTP/trunk/Lib/Geom
- Timestamp:
- 07/06/06 20:20:06 (18 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/GTGeometry.vcproj
r1083 r1090 77 77 <Tool 78 78 Name="VCLibrarianTool" 79 OutputFile="$(OutDir)/GTGeometry.lib"/> 79 OutputFile="$(OutDir)/GTGeometry.lib" 80 IgnoreAllDefaultLibraries="TRUE" 81 IgnoreDefaultLibraryNames="LIBC"/> 80 82 <Tool 81 83 Name="VCMIDLTool"/> -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodStripsLibrary.h
r1083 r1090 144 144 void UpdateDataRetrievalInterface(void); 145 145 146 //Number of strips in each submesh 147 int* mStripsSubmesh; 148 146 149 public: 147 150 … … 177 180 uint32 GetValidIndexCount(int submeshid) const { return indices_x_submesh[submeshid]; } 178 181 uint32 GetValidOffset(int submeshid) const { return offsets_x_submesh[submeshid]; } 182 uint32 GetTotalStripCount(void) const { return mTotalStrips; } 183 uint32 GetSubMeshtripCount(int submeshid) const { return mStripsSubmesh[submeshid]; } 179 184 }; 180 185 } -
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodTreeLibrary.h
r1083 r1090 24 24 LodTreeLibrary( const LodStripsLibraryData *, 25 25 const TreeSimplificationSequence *, 26 Geometry::Mesh *treeGeoMesh ,26 Geometry::Mesh *treeGeoMesh/*, 27 27 uint32 leafSubMeshID 28 28 /*std::string foliage_verts, … … 65 65 const IndexData* CurrentLOD_Foliage_Indices(void) const; 66 66 const VertexData* Get_Foliage_VertexData(void) const; 67 uint32 GetLeavesSubMesh(void) const { return mLeavesSubMesh; } 67 68 68 69 private: 69 70 Foliage *foliage; 70 71 Geometry::LodStripsLibrary *trunk; 72 uint32 mLeavesSubMesh; 71 73 }; 72 74 } -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp
r1078 r1090 3 3 #include <time.h> 4 4 #include "GeoLodStripsConstructor.h" 5 #include "GeoMeshLoader.h" 5 6 6 7 using namespace Geometry; … … 619 620 int dataCount = this->cDatos.size(); 620 621 int cambiosCount = this->TOTALCAMBIOS; 621 int size= dataCount*sizeof(LODData) + (vertexCount + changesCount + cambiosCount + 4)*sizeof(int); 622 int size = changesCount*sizeof(LODData) + 623 (vertexCount + dataCount + cambiosCount + 4)*sizeof(int) + 624 CHUNK_OVERHEAD_SIZE; 622 625 623 626 FILE *f = fopen(filename.c_str(),"ab"); -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp
r1088 r1090 34 34 indices_x_submesh = NULL; 35 35 offsets_x_submesh = NULL; 36 mStripsSubmesh = NULL; 36 37 37 38 // Loads the Level Of Detail file. … … 61 62 if (offsets_x_submesh) 62 63 delete[] offsets_x_submesh; 64 if (mStripsSubmesh) 65 delete[] mStripsSubmesh; 63 66 } 64 67 … … 573 576 mData = lodstripsdata->mData; 574 577 p_changes = lodstripsdata->p_changes; 575 576 577 // Max / Min values for LOD. 578 mLods = int(p_changes.size()); 579 mMaxLod = 0; 580 mMinLod = mLods; 581 582 mPChanges = new SmallInt[mLods]; 583 584 for (unsigned int i = 0; i < mLods; i++) 585 { 586 mPChanges[i] = p_changes[i]; 587 } 588 589 mTotalVertices = int(mFileVertices.size()); 590 mMaxVerticesLOD = mTotalVertices; 591 mTotalStrips = int(mFileStrips.size()); 592 mTotalChanges = int(mFileChangesLOD.size()); 593 594 //Copy the data to the structure we will use 595 CopyVectors2Arrays(); 578 579 mStripsSubmesh = new int [geomesh->mSubMeshCount]; 580 for (int submesh = 0; submesh < geomesh->mSubMeshCount; submesh++) 581 { 582 mStripsSubmesh[submesh]=0; 583 } 584 585 586 // Max / Min values for LOD. 587 mLods = int(p_changes.size()); 588 mMaxLod = 0; 589 mMinLod = mLods; 590 591 mPChanges = new SmallInt[mLods]; 592 593 for (unsigned int i = 0; i < mLods; i++) 594 { 595 mPChanges[i] = p_changes[i]; 596 } 597 598 mTotalVertices = int(mFileVertices.size()); 599 mMaxVerticesLOD = mTotalVertices; 600 mTotalStrips = int(mFileStrips.size()); 601 mTotalChanges = int(mFileChangesLOD.size()); 602 603 //Copy the data to the structure we will use 604 CopyVectors2Arrays(); 596 605 // } 597 606 } … … 618 627 619 628 counter = 0; 629 mStripsSubmesh[target_submesh] = strip_count; 620 630 strip_count = 0; 621 631 target_submesh++; … … 655 665 656 666 counter = 0; 667 mStripsSubmesh[target_submesh] = strip_count; 657 668 strip_count = 0; 658 669 target_submesh++; -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp
r1083 r1090 7 7 Geometry::LodTreeLibrary::LodTreeLibrary(const LodStripsLibraryData *lodstripsdata, 8 8 const TreeSimplificationSequence *simpseq, 9 Geometry::Mesh *treeGeoMesh ,10 uint32 leafSubMeshID /*9 Geometry::Mesh *treeGeoMesh/*, 10 uint32 leafSubMeshID, 11 11 CREATEVERTEXDATAFUNC vdfun, 12 12 CREATEINDEXDATAFUNC idfun, … … 16 16 trunk = new LodStripsLibrary(lodstripsdata,treeGeoMesh); 17 17 18 // select the first triangle-list submesh as leaves submesh 19 mLeavesSubMesh = -1; 20 for (int i=0; i<treeGeoMesh->mSubMeshCount; i++) 21 { 22 if (treeGeoMesh->mSubMesh[i].mType==GEO_TRIANGLE_LIST) 23 { 24 mLeavesSubMesh=i; 25 break; 26 } 27 } 28 18 29 // Cargar la copa del árbol 19 Geometry::SubMesh * leafsSubMesh = &(treeGeoMesh->mSubMesh[ leafSubMeshID]);30 Geometry::SubMesh * leafsSubMesh = &(treeGeoMesh->mSubMesh[mLeavesSubMesh]); 20 31 foliage = new Foliage(leafsSubMesh,simpseq); 21 32 GoToFoliageLod(1.0f); -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoTreeSimpSequence.cpp
r1078 r1090 2 2 #include <iostream> 3 3 #include <fstream> 4 #include "GeoMeshLoader.h" 4 5 5 6 using namespace Geometry; … … 68 69 unsigned short chunkid = 0xdcba; 69 70 s.WriteData(&chunkid,sizeof(unsigned short),1); 70 unsigned long size = mSteps.size()*8*sizeof(int) ;71 unsigned long size = mSteps.size()*8*sizeof(int) + CHUNK_OVERHEAD_SIZE; 71 72 s.WriteData(&size,sizeof(unsigned long),1); 72 73 -
GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshViewUI.h
r1083 r1090 374 374 void setLodStripsLibrary(const Geometry::LodStripsLibraryData *, Mesh *geomesh); 375 375 // Initialize the lodtreelibrary for visualization. 376 void setLodTreesLibrary(const Geometry::LodStripsLibraryData *, const Geometry::TreeSimplificationSequence *, Mesh *geomesh , uint32 ileafSubMesh);376 void setLodTreesLibrary(const Geometry::LodStripsLibraryData *, const Geometry::TreeSimplificationSequence *, Mesh *geomesh/*, uint32 ileafSubMesh*/); 377 377 378 378 // Indentify the mesh of leaves. -
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp
r1083 r1090 1032 1032 for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++) 1033 1033 { 1034 if (submesh==leavesSubMesh) 1034 //if (submesh==leavesSubMesh) 1035 if (submesh == lodTreeLib->GetLeavesSubMesh()) 1035 1036 continue; 1036 1037 -
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp
r1083 r1090 852 852 if (geoMeshLoader->GetTreeSimpSeq() && geoMeshLoader->GetLodStripsData()) 853 853 { 854 // select the first triangle-list submesh as leaves submesh854 /* // select the first triangle-list submesh as leaves submesh 855 855 int leafsSubMeshID = -1; 856 856 … … 862 862 break; 863 863 } 864 } 865 866 setLodTreesLibrary(geoMeshLoader->GetLodStripsData(), geoMeshLoader->GetTreeSimpSeq(), mGeoMesh , leafsSubMeshID);864 }*/ 865 866 setLodTreesLibrary(geoMeshLoader->GetLodStripsData(), geoMeshLoader->GetTreeSimpSeq(), mGeoMesh/*, leafsSubMeshID*/); 867 867 868 868 // Sets the aplication mode. … … 2342 2342 // Initialize the lodTreelibrary for visualization. 2343 2343 //--------------------------------------------------------------------------- 2344 void GeoMeshViewUI::setLodTreesLibrary(const LodStripsLibraryData *lodstripsdata, const TreeSimplificationSequence *treesimpseq, Mesh *geomesh , uint32 ileafSubMesh)2344 void GeoMeshViewUI::setLodTreesLibrary(const LodStripsLibraryData *lodstripsdata, const TreeSimplificationSequence *treesimpseq, Mesh *geomesh/*, uint32 ileafSubMesh*/) 2345 2345 { 2346 2346 // If there is no lod strips object. … … 2350 2350 // New lod strips object. 2351 2351 2352 lodTreeLib = new Geometry::LodTreeLibrary(lodstripsdata,treesimpseq,geomesh ,ileafSubMesh);2352 lodTreeLib = new Geometry::LodTreeLibrary(lodstripsdata,treesimpseq,geomesh/*,ileafSubMesh*/); 2353 2353 2354 2354 // Sets the slider range.
Note: See TracChangeset
for help on using the changeset viewer.