CEDRIC  Revision_backup-2009-02
ChangeLineWidthVisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 2008 Boris Iven, Max Hermann
4  *
5  * This file is part of the "CEDRIC Event Display" application.
6  *
7  *****************************************************************************/
8 
9 #ifndef CHANGELINEWIDTHVISITOR_H_
10 #define CHANGELINEWIDTHVISITOR_H_
11 
12 #include <osg/NodeVisitor>
13 #include <osg/Vec3>
14 #include <osg/Vec4>
15 
16 class osg::Geode;
17 class osg::Switch;
18 
20 class ChangeLineWidthVisitor : public osg::NodeVisitor
21 {
22 public:
23  ChangeLineWidthVisitor( float lineWidth=1.f );
24  virtual ~ChangeLineWidthVisitor();
25 
27  void setLineWidth( float lineWidth ) { m_lineWidth=lineWidth; }
28 
30  virtual void apply( osg::Geode& geode );
31 
32 private:
33  float m_lineWidth;
34 };
35 
36 #endif /*CHANGELINEWIDTHVISITOR_H_*/
void setLineWidth(float lineWidth)
Set line width.
Definition: ChangeLineWidthVisitor.h:27
NodeVisitor for changing linewidth through stateattribute for geodes.
Definition: ChangeLineWidthVisitor.h:20
virtual void apply(osg::Geode &geode)
Visitor implementation goes here.
Definition: ChangeLineWidthVisitor.cpp:34
virtual ~ChangeLineWidthVisitor()
Definition: ChangeLineWidthVisitor.cpp:30
ChangeLineWidthVisitor(float lineWidth=1.f)
Definition: ChangeLineWidthVisitor.cpp:24