Ignore:
Timestamp:
07/06/06 20:20:06 (18 years ago)
Author:
gumbau
Message:

LodTreeLibrary? constructor now has 3 parameters.
The leaves submesh is calculated inside the constructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsLibrary.cpp

    r1088 r1090  
    3434        indices_x_submesh = NULL; 
    3535        offsets_x_submesh = NULL; 
     36        mStripsSubmesh = NULL; 
    3637         
    3738        //      Loads the Level Of Detail file. 
     
    6162        if (offsets_x_submesh) 
    6263                delete[] offsets_x_submesh; 
     64        if (mStripsSubmesh) 
     65                delete[] mStripsSubmesh; 
    6366} 
    6467 
     
    573576        mData = lodstripsdata->mData; 
    574577        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(); 
    596605//      } 
    597606} 
     
    618627 
    619628                        counter = 0; 
     629                        mStripsSubmesh[target_submesh] = strip_count; 
    620630                        strip_count = 0; 
    621631                        target_submesh++; 
     
    655665 
    656666                counter = 0; 
     667                mStripsSubmesh[target_submesh] = strip_count; 
    657668                strip_count = 0; 
    658669                target_submesh++; 
Note: See TracChangeset for help on using the changeset viewer.