Changeset 1069 for GTP/trunk/Lib/Geom/shared/GTGeometry/src
- Timestamp:
- 06/28/06 17:50:02 (19 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared/GTGeometry/src
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp
r1058 r1069 17 17 // Constructors. 18 18 //----------------------------------------------------------------------------- 19 LodStripsLibrary::LodStripsLibrary( std::string name, Mesh *geomesh, CREATEMULTIINDEXDATAFUNC midfun)20 :create_ multi_index_data_func(midfun?midfun:DefaultMultiIndexDataCreator)19 LodStripsLibrary::LodStripsLibrary(std::string name, Mesh *geomesh, CREATEINDEXDATAFUNC idfun) 20 :create_index_data_func(idfun?idfun:DefaultIndexDataCreator) 21 21 { 22 22 const char *name_of_file; … … 241 241 242 242 //----------------------------------------------------------------------------- 243 // Gets the maximum level of detail.244 //-----------------------------------------------------------------------------245 uint32 LodStripsLibrary::MaxLod()246 {247 return mMaxLod;248 }249 250 //-----------------------------------------------------------------------------251 // Gets the minimum level of detail.252 //-----------------------------------------------------------------------------253 uint32 LodStripsLibrary::MinLod()254 {255 return mMinLod;256 }257 258 //-----------------------------------------------------------------------------259 243 // Returns the number of vertices of the highest LOD. 260 244 //----------------------------------------------------------------------------- … … 386 370 mTotalFaces = 0; 387 371 388 unsigned int * strip_sizes = new unsigned int[mFileStrips.size()]; 372 // unsigned int * strip_sizes = new unsigned int[mFileStrips.size()]; 373 unsigned int total_strip_size = 0; 389 374 for (i = 0; i < mFileStrips.size(); i++) 390 375 { 391 strip_sizes[i]= t = int(mFileStrips[i].size());376 total_strip_size += t = int(mFileStrips[i].size()); 392 377 if (t>max) 393 378 max = t; … … 406 391 407 392 // Copy strips. 408 dataRetrievalInterface=create_ multi_index_data_func(mFileStrips.size(),strip_sizes);409 dataRetrievalInterface->Begin(); 410 for (i = 0; i < mFileStrips.size(); i++)411 { 412 for (j = 0; j < mFileStrips[i].size(); j++ )393 dataRetrievalInterface=create_index_data_func(total_strip_size); 394 dataRetrievalInterface->Begin(); 395 for (int ii = 0, i = 0; i < mFileStrips.size(); i++) 396 { 397 for (j = 0; j < mFileStrips[i].size(); j++,ii++) 413 398 { 414 399 mStrips[i].push_back(mFileStrips[i][j]); 415 dataRetrievalInterface->SetIndex(i ,j,mFileStrips[i][j]);400 dataRetrievalInterface->SetIndex(ii,mFileStrips[i][j]); 416 401 } 417 402 … … 434 419 } 435 420 436 delete[] strip_sizes;421 // delete[] strip_sizes; 437 422 } 438 423 … … 593 578 { 594 579 dataRetrievalInterface->Begin(); 595 for (int i=0; i<mTotalStrips; i++) 596 { 597 unsigned int j=0; 598 for (SmallIntVector::iterator it=mStrips[i].begin(); it!=mStrips[i].end(); it++, j++) 599 dataRetrievalInterface->SetIndex(i,j,*it); 600 dataRetrievalInterface->SetNumValidIndices(i,j); 580 for (int i=0, ii=0; i<mTotalStrips; i++) 581 { 582 for (SmallIntVector::iterator it=mStrips[i].begin(); it!=mStrips[i].end(); it++, ii++) 583 dataRetrievalInterface->SetIndex(ii,*it); 584 dataRetrievalInterface->SetNumValidIndices(ii); 601 585 } 602 586 dataRetrievalInterface->End(); -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodTreeLibrary.cpp
r1058 r1069 48 48 // if (current_foliage_indices) delete[] current_foliage_indices;*/ 49 49 } 50 50 /* 51 51 uint32 LodTreeLibrary::CurrentLOD_Trunk_StripCount(void) const 52 52 { 53 53 assert(trunk); 54 // return trunk->TOTALTIRAS;55 return trunk->dataRetrievalInterface->GetNumPrims();56 } 57 58 59 uint32 LodTreeLibrary::CurrentLOD_Trunk_IndexCountByStrip(uint32 istrip) const54 return trunk->TOTAL; 55 // return trunk->dataRetrievalInterface->GetNumPrims(); 56 }*/ 57 58 59 /*uint32 LodTreeLibrary::CurrentLOD_Trunk_IndexCountByStrip(uint32 istrip) const 60 60 { 61 61 assert(trunk); … … 64 64 return trunk->dataRetrievalInterface->GetNumValidIndices(istrip); 65 65 } 66 /* 66 67 67 uint32 LodTreeLibrary::CurrentLOD_Trunk_IndexCount(void) const 68 68 { … … 146 146 return trunk->vertices; 147 147 }*/ 148 const MultiIndexData* LodTreeLibrary::CurrentLOD_Trunk_Indices(void) const148 const IndexData* LodTreeLibrary::CurrentLOD_Trunk_Indices(void) const 149 149 { 150 150 return trunk->dataRetrievalInterface; -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/leaves/VertexData.cpp
r831 r1069 35 35 36 36 37 Geometry::DefaultMultiIndexData::DefaultMultiIndexData(unsigned int numprims, unsigned int *numi):Geometry::MultiIndexData(numprims,numi)37 /*Geometry::DefaultMultiIndexData::DefaultMultiIndexData(unsigned int numprims, unsigned int *numi):Geometry::MultiIndexData(numprims,numi) 38 38 { 39 39 indices = new unsigned int*[numprims]; … … 52 52 return new DefaultMultiIndexData(numprims,numi); 53 53 } 54 */
Note: See TracChangeset
for help on using the changeset viewer.