9 #ifndef CHANGECOLORVISITOR_H_
10 #define CHANGECOLORVISITOR_H_
12 #include <osg/NodeVisitor>
13 #include <osg/StateSet>
42 virtual void apply( osg::Geode& geode );
osg::Vec4 m_color
Definition: ChangeColorVisitor.h:54
virtual void apply(osg::Geode &geode)
Visitor implementation goes here.
Definition: ChangeColorVisitor.cpp:85
int getNumberOfChangedDrawables() const
Return number of changed drawables since last reset() call.
Definition: ChangeColorVisitor.cpp:46
void setColor(osg::Vec4 color)
Set RGBA color.
void setBlendState(osg::StateSet *stateSet)
Enables blending (and sets blendfunc) if m_color alpha component < 1 else disables blending (applies ...
Definition: ChangeColorVisitor.cpp:68
void setChangeBlendState(bool b)
Allow/Forbid changing the blend state (by default changing blend state is forbidden) ...
Definition: ChangeColorVisitor.h:48
bool m_dontChangeBlendState
Definition: ChangeColorVisitor.h:58
void setAlpha(float alpha)
Set alpha value.
Definition: ChangeColorVisitor.cpp:63
void reset()
Only resets number of changed drawables (see getNumberOfChangedDrawables())
Definition: ChangeColorVisitor.cpp:36
bool m_AlphaOnly
Definition: ChangeColorVisitor.h:56
void changeOnlyAlpha(bool b)
Only change alpha value of drawables.
Definition: ChangeColorVisitor.cpp:41
int m_numberOfChangedDrawables
Definition: ChangeColorVisitor.h:55
ChangeColorVisitor(osg::Vec3 color=osg::Vec3(1.0, 1.0, 1.0))
Definition: ChangeColorVisitor.cpp:27
NodeVisitor for changing color or alpha of ShapeDrawables.
Definition: ChangeColorVisitor.h:21