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/ive/AutoTransform.cpp

    r4992 r7968  
    3838    out->writeBool(getAutoScaleToScreen()); 
    3939 
     40    if ( out->getVersion() >= VERSION_0025 ) 
     41    { 
     42        out->writeFloat(getMinimumScale()); 
     43        out->writeFloat(getMaximumScale()); 
     44        out->writeFloat(getAutoScaleTransistionWidthRatio()); 
     45    } 
     46 
    4047    out->writeQuat(getRotation()); 
    4148    out->writeVec3(getScale()); 
     49     
    4250} 
    4351 
     
    6573        setAutoScaleToScreen(in->readBool()); 
    6674 
     75        if ( in->getVersion() >= VERSION_0025 ) 
     76        { 
     77            setMinimumScale(in->readFloat()); 
     78            setMaximumScale(in->readFloat()); 
     79            setAutoScaleTransistionWidthRatio(in->readFloat()); 
     80        } 
     81 
    6782        setRotation(in->readQuat()); 
    6883        setScale(in->readVec3()); 
     84 
     85 
    6986    } 
    7087    else{