35#define META_Effect(library, classname, effectname, effectdescription, effectauthor) \
36 META_Node(library, classname) \
37 virtual const char *effectName() const { return effectname; } \
38 virtual const char *effectDescription() const { return effectdescription; } \
39 virtual const char *effectAuthor() const { return effectauthor; }
72 virtual inline const char*
libraryName()
const {
return "osgFX"; }
73 virtual inline const char*
className()
const {
return "Effect"; }
98 inline int getNumTechniques()
const;
104 inline const Technique* getTechnique(
int i)
const;
107 inline int getSelectedTechnique()
const;
114 inline void selectTechnique(
int i = AUTO_DETECT);
130 inline void dirtyTechniques();
133 inline void addTechnique(
Technique* tech);
148 typedef std::vector<osg::ref_ptr<Technique> > Technique_list;
149 Technique_list _techs;
156 int _global_sel_tech;
162 void build_dummy_node();
179 return static_cast<int>(_techs.size());
184 return _techs[i].get();
189 return _techs[i].get();
194 return _global_sel_tech;
199 _global_sel_tech = i;
204 _techs.push_back(tech);
209 _techs_defined =
false;
215 inherited::traverse(nv);
The osgFX library is a NodeKit that extends the core scene graph to provide a special effects framewo...
Definition AnisotropicLighting:25
Implements a simple buffered value for values that need to be buffered on a per graphics context basi...
Definition buffered_value:27
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
General group node which maintains a list of children.
Definition Group:29
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
virtual const char * effectAuthor() const =0
get the effect author's name
bool getEnabled() const
get whether the effect is enabled or not
Definition Effect:167
Effect(const Effect ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Technique * getTechnique(int i)
get the i-th Technique
Definition Effect:182
int getNumTechniques() const
get the number of techniques defined for this Effect
Definition Effect:177
virtual bool isSameKindAs(const osg::Object *obj) const
return true if this and obj are of the same kind of object.
Definition Effect:71
int getSelectedTechnique() const
get the index of the currently selected Technique
Definition Effect:192
virtual const char * effectDescription() const =0
get a brief description of this Effect
Effect & operator=(const Effect &)
Definition Effect:127
virtual void setUpDemo()
optional: set effect parameters to produce a visually significant result to be used in demo applicati...
Definition Effect:95
friend class Validator
Definition Effect:144
virtual const char * effectName() const =0
get the name of this Effect
void dirtyTechniques()
force rebuilding of techniques on next traversal
Definition Effect:207
virtual const char * libraryName() const
return the name of the node's library.
Definition Effect:72
void setEnabled(bool v)
set whether the effect is enabled or not
Definition Effect:172
virtual bool define_techniques()=0
abstract method to be implemented in derived classes; its purpose if to create the techniques that ca...
void selectTechnique(int i=AUTO_DETECT)
select a technique or enable automatic detection
Definition Effect:197
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
void inherited_traverse(osg::NodeVisitor &nv)
default traversal
Definition Effect:212
virtual const char * className() const
return the name of the node's class type.
Definition Effect:73
void addTechnique(Technique *tech)
add a technique to the Effect
Definition Effect:202
virtual void traverse(osg::NodeVisitor &nv)
custom traversal
virtual void releaseGLObjects(osg::State *state=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
TechniqueSelection
Definition Effect:109
@ AUTO_DETECT
Definition Effect:110
This is the base class for effect techniques.
Definition Technique:57
#define NULL
Definition Export:55
#define OSGFX_EXPORT
Definition Export:27