Show
Ignore:
Timestamp:
03/18/08 16:37:38 (7 years ago)
Author:
robert
Message:

To osg::AutoTransform? added support for MinimumScale?, MaximumScale? and AutoScaleTransitionWidth? parameters
and a new scheme for computing the scaling when using autoscale that introduces smooth
transitions to the scaling of the subgraph so that it looks more natural.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/osg/AutoTransform.cpp

    r7965 r7968  
    141141    } 
    142142 
     143    if (fr.matchSequence("autoScaleTransistionWidthRatio %f")) 
     144    { 
     145        float ratio; 
     146        fr[1].getFloat(ratio); 
     147         
     148        transform.setAutoScaleTransistionWidthRatio(ratio); 
     149 
     150        fr += 2; 
     151        iteratorAdvanced = true; 
     152    } 
     153 
     154 
    143155    return iteratorAdvanced; 
    144156} 
     
    168180    } 
    169181 
    170  
    171182    fw.indent()<<"autoScaleToScreen "<<(transform.getAutoScaleToScreen()?"TRUE":"FALSE")<<std::endl; 
    172  
     183     
     184    if (transform.getAutoScaleTransistionWidthRatio()!=0.25)  
     185    { 
     186            fw.indent()<<"autoScaleTransistionWidthRatio "<<transform.getAutoScaleTransistionWidthRatio()<<std::endl; 
     187    } 
     188     
    173189    return true; 
    174190}