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:
Robert Osfield
2002-08-11 21:26:58 +00:00
parent 19eaf17632
commit 7010c1c4f8
7 changed files with 93 additions and 67 deletions

View File

@@ -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;