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

    _mode = mode;

}
Пример #2
0
/////////////////////////////////////////////////////////////////
//
// GLObjectsVisitor
//
GLObjectsVisitor::GLObjectsVisitor(Mode mode)
{
    setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);

    _mode = mode;
    _checkGLErrors = osg::State::ONCE_PER_ATTRIBUTE;
}
Пример #3
0
    ModifyMaterialVisitor::ModifyMaterialVisitor() :
        _ambientFlag(false),
        _diffuseFlag(false), 
        _specularFlag(false), 
        _shininessFlag(false) {
        setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);

    }
Пример #4
0
		/**
		* 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;

		}
Пример #5
0
    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;
  }
Пример #6
0
 InfoVisitor()
     : level_(0)
 {
     setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
 }
Пример #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);
 }
Пример #9
0
osgToy::FacetingVisitor::FacetingVisitor()
{
    setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
}
Пример #10
0
 FindTextureVisitor(osg::Texture* tex)
     : texture_(tex)
 {
     setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
 }