Ported distribution across to use the new osg::MatrixTransform and osg::BlendFunc

class instead of osg::Transform and osg::Transparancy respectively.
This commit is contained in:
Robert Osfield
2002-07-12 18:12:01 +00:00
parent 8128265e09
commit 6f392cdbfa
32 changed files with 93 additions and 97 deletions

View File

@@ -999,10 +999,12 @@ void Optimizer::RemoveRedundentNodesVisitor::apply(osg::Group& group)
void Optimizer::RemoveRedundentNodesVisitor::apply(osg::Transform& transform)
{
if (transform.getNumParents()>0)
if (transform.getNumParents()>0 && transform.getDataVariance()==osg::Object::STATIC)
{
static osg::Matrix identity;
if (transform.getMatrix()==identity && transform.getDataVariance()==osg::Object::STATIC)
osg::Matrix matrix;
transform.getWorldToLocalMatrix(matrix,NULL);
if (matrix==identity)
{
_redundentNodeList.insert(&transform);
}