Added a dirtyBound & diryDisplayList to the geometry merge operation in the

Optimizer to fix a bug where the bouding volumes where being invildated.
This commit is contained in:
Robert Osfield
2002-10-31 15:24:17 +00:00
parent 24746728e4
commit 75fb39adbd

View File

@@ -47,6 +47,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options)
}
if (options & REMOVE_REDUNDENT_NODES)
{
@@ -60,6 +61,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options)
}
#if defined(CONVERT_GEOSET_TO_GEOMETRY)
// convert the old style GeoSet to Geometry
ConvertGeoSetsToGeometryVisitor cgtg;
@@ -1280,6 +1282,8 @@ bool Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode& geode)
}
}
// geode.dirtyBound();
return false;
}
@@ -1349,6 +1353,9 @@ bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry& lhs,osg::Geom
lhs.getPrimitiveSetList().insert(lhs.getPrimitiveSetList().end(),
rhs.getPrimitiveSetList().begin(),rhs.getPrimitiveSetList().end());
lhs.dirtyBound();
lhs.dirtyDisplayList();
return true;
}