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.
This commit is contained in:
Robert Osfield
2008-03-18 15:37:38 +00:00
parent b08f438946
commit 1d1dcf2cf3
6 changed files with 80 additions and 7 deletions

View File

@@ -83,6 +83,9 @@ class OSG_EXPORT AutoTransform : public Transform
bool getAutoScaleToScreen() const { return _autoScaleToScreen; }
void setAutoScaleTransistionWidthRatio(float ratio) { _autoScaleTransitionWidthRatio = ratio; }
float getAutoScaleTransistionWidthRatio() const { return _autoScaleTransitionWidthRatio; }
virtual bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor* nv) const;
@@ -115,7 +118,7 @@ class OSG_EXPORT AutoTransform : public Transform
float _minimumScale;
float _maximumScale;
float _autoScaleTransitionWidthRatio;
void computeMatrix() const;