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

@@ -28,6 +28,8 @@
#include <osg/AutoTransform>
#include <osg/Geometry>
#include <osgDB/WriteFile>
#include <osgText/Text>
#include <iostream>
@@ -112,6 +114,7 @@ osg::Node* createAxis(const osg::Vec3& s, const osg::Vec3& e, int numReps, osg::
osg::Geometry* geom = new osg::Geometry;
geom->setVertexArray(vertices);
geom->setColorArray(colors);
geom->setColorBinding(osg::Geometry::BIND_OVERALL);
geom->addPrimitiveSet(new osg::DrawArrays(GL_LINE_STRIP,0,vertices->size()));
osg::Geode* geode = new osg::Geode;
@@ -138,6 +141,7 @@ osg::Node* createAxis(const osg::Vec3& s, const osg::Vec3& e, int numReps, osg::
osg::Geometry* geom = new osg::Geometry;
geom->setVertexArray(vertices);
geom->setColorArray(colors);
geom->setColorBinding(osg::Geometry::BIND_OVERALL);
geom->addPrimitiveSet(new osg::DrawArrays(GL_LINE_STRIP,0,vertices->size()));
osg::Geode* geode = new osg::Geode;