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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user