Updated the Optimzer::FatternStaticTransform visit so by default it ignores

all dynamic transforms, previously it flattened dynamic transforms as well.
This commit is contained in:
Robert Osfield
2001-12-17 15:05:06 +00:00
parent 61643f2ae9
commit bc49a83c51
4 changed files with 34 additions and 20 deletions

View File

@@ -49,12 +49,16 @@ class OSGUTIL_EXPORT Optimizer
public:
typedef std::vector<osg::Matrix> MatrixStack;
MatrixStack _matrixStack;
typedef std::set<osg::Transform*> TransformList;
TransformList _transformList;
MatrixStack _matrixStack;
TransformList _transformList;
bool _ignoreDynamicTransforms;
FlattenStaticTransformsVisitor():osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
FlattenStaticTransformsVisitor(bool ignoreDynamicTransforms=true):
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
_ignoreDynamicTransforms(ignoreDynamicTransforms) {}
virtual void apply(osg::Geode& geode);
virtual void apply(osg::Billboard& billboard);