/////////////////////////////////////////////////////////////////
//
// GLObjectsVisitor
//
GLObjectsVisitor::GLObjectsVisitor(Mode mode)
{
    setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);

    _mode = mode;

}
/////////////////////////////////////////////////////////////////
//
// GLObjectsVisitor
//
GLObjectsVisitor::GLObjectsVisitor(Mode mode)
{
    setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);

    _mode = mode;
    _checkGLErrors = osg::State::ONCE_PER_ATTRIBUTE;
}
    ModifyMaterialVisitor::ModifyMaterialVisitor() :
        _ambientFlag(false),
        _diffuseFlag(false), 
        _specularFlag(false), 
        _shininessFlag(false) {
        setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);

    }
		/**
		* Create the visitor that will convert primitive sets to draw
		* <num> instances.
		*/
		ConvertToDrawInstanced(unsigned numInstances, const osg::BoundingBoxd& bbox, bool optimize) :
			_numInstances(numInstances),
			_optimize(optimize)
		{
			setTraversalMode( TRAVERSE_ALL_CHILDREN );
			setNodeMaskOverride( ~0 );
			_staticBBoxCallback = new StaticBoundingBox(bbox);
			_bb = bbox;

		}
    bool BaseDotVisitor::run( osg::Node& root, std::ostream* fout ) {
    setTraversalMode( TRAVERSE_ALL_CHILDREN );
    if ( fout && *fout ) {
      root.accept( *this );

      *fout << "digraph osg_scenegraph { "<<_rankdir<< std::endl;

      *fout << _nodes.str() << _edges.str();

      *fout << "}" << std::endl;

      _nodes.clear();
      _edges.clear();
      _objectMap.clear();

      return true;
    }

    return false;
  }
Exemple #6
0
 InfoVisitor()
     : level_(0)
 {
     setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
 }
Exemple #7
0
 InfoVisitor::InfoVisitor()
         : _level(0)
 {
     setTraversalMode(NodeVisitor::TRAVERSE_ALL_CHILDREN);
 }
 AddInteractionCallbackToDrawableVisitor::AddInteractionCallbackToDrawableVisitor(brtr::BaseInteractionCallback* callbackToAdd) {
     setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
     _containerToAdd = new osg::DefaultUserDataContainer;
     _containerToAdd->addUserObject(callbackToAdd);
 }
Exemple #9
0
osgToy::FacetingVisitor::FacetingVisitor()
{
    setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
}
Exemple #10
0
 FindTextureVisitor(osg::Texture* tex)
     : texture_(tex)
 {
     setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
 }