Ignore:
Timestamp:
11/22/06 15:51:08 (18 years ago)
Author:
gumbau
Message:

Fixed bug selecting the lowest LOD in the Foliage class.

Location:
GTP/trunk/Lib/Geom/shared/GTGeometry/src
Files:
2 edited

Legend:

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

    r1526 r1782  
    102102                                                                                                        + 
    103103                                                                                newlod * foliage->leafCount     ); 
    104  
     104         
    105105        foliage->CalculateLOD(targetLeaves); 
    106106 
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/leaves/foliage.cpp

    r1526 r1782  
    8484void Foliage::CalculateLOD(int nleaves) 
    8585{ 
    86         if ((nleaves <= leafCount) && (nleaves > minLeaves)) 
     86        if (nleaves>=leafCount) 
     87                nleaves=leafCount-1; 
     88//      if (nleaves<=minLeaves) 
     89//              nleaves=minLeaves+1;     
     90        if ((nleaves < leafCount) && (nleaves >= minLeaves)) 
    8791        { 
    8892                if ( nleaves < active_leaf_count) { 
     
    106110        j = num; 
    107111        h = final+1; 
    108                 while ((h<=leafTotal) && (j>0)) 
     112                while ((h<leafTotal) && (j>0)) 
    109113                { 
    110114                        while (( begin == Leaves[h].childLeft) || ( begin == Leaves[h].childRight)) 
Note: See TracChangeset for help on using the changeset viewer.