optimizer: fix FlattenStaticTransformsVisitor not respecting the is permissible callback

0.6.1
scrawl 8 years ago
parent 5866f0f80b
commit 4051018862

@ -281,11 +281,11 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor
ObjectStruct():_canBeApplied(true),_moreThanOneMatrixRequired(false) {}
void add(osg::Transform* transform)
void add(osg::Transform* transform, bool canOptimize)
{
if (transform)
{
if (transform->getDataVariance()!=osg::Transform::STATIC) _moreThanOneMatrixRequired=true;
if (!canOptimize) _moreThanOneMatrixRequired=true;
else if (transform->getReferenceFrame()!=osg::Transform::RELATIVE_RF) _moreThanOneMatrixRequired=true;
else
{
@ -322,7 +322,7 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor
itr!=_currentObjectList.end();
++itr)
{
_objectMap[*itr].add(transform);
_objectMap[*itr].add(transform, transform && isOperationPermissibleForObject(transform));
}
}

Loading…
Cancel
Save