|
|
|
@ -100,14 +100,13 @@ namespace
|
|
|
|
|
|
|
|
|
|
virtual void traverse(osg::NodeVisitor& nv)
|
|
|
|
|
{
|
|
|
|
|
const osg::FrameStamp* stamp = nv.getFrameStamp();
|
|
|
|
|
if (!stamp || nv.getTraversalMode() != osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN)
|
|
|
|
|
if (nv.getTraversalMode() != osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN)
|
|
|
|
|
osg::Group::traverse(nv);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (unsigned int i=0; i<getNumChildren(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if (i%2 == stamp->getFrameNumber()%2)
|
|
|
|
|
if (i%2 == nv.getTraversalNumber()%2)
|
|
|
|
|
getChild(i)->accept(nv);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -182,9 +181,9 @@ namespace
|
|
|
|
|
if (!geom)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (mLastFrameNumber == nv->getFrameStamp()->getFrameNumber())
|
|
|
|
|
if (mLastFrameNumber == nv->getTraversalNumber())
|
|
|
|
|
return false;
|
|
|
|
|
mLastFrameNumber = nv->getFrameStamp()->getFrameNumber();
|
|
|
|
|
mLastFrameNumber = nv->getTraversalNumber();
|
|
|
|
|
|
|
|
|
|
geom->transformSoftwareMethod();
|
|
|
|
|
return false;
|
|
|
|
|