Removed dependency of the new osg::DOFTransform and osg::Sequence Node's
on osgUtil by implementing a NodeVisitor::VisitorType enum, and associated g/setVisitorType. This allows callbacks to querry the visitor/traversal type without doing down cast's to specific visitor subclasses such as osgUtil::AppVisitor/CullVisitor.
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
#include <osg/Sequence>
|
||||
|
||||
#include <osgUtil/AppVisitor>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
/**
|
||||
@@ -100,8 +98,8 @@ void Sequence::setMode(SequenceMode mode)
|
||||
|
||||
void Sequence::traverse(NodeVisitor& nv)
|
||||
{
|
||||
osgUtil::AppVisitor* app = dynamic_cast<osgUtil::AppVisitor*>(&nv);
|
||||
if (app && _mode == START && _nrepsremain) {
|
||||
if (nv.getVisitorType()==NodeVisitor::APP_VISITOR && _mode == START && _nrepsremain)
|
||||
{
|
||||
double t = nv.getFrameStamp()->getReferenceTime();
|
||||
if (_last == -1.0)
|
||||
_last = t;
|
||||
|
||||
Reference in New Issue
Block a user