class OSGFX_EXPORT osgFX::Technique

This is the base class for effect techniques.

Inheritance:


Public Methods

[more] Technique()
[more]virtual const char* techniqueName()
get the name of this technique
[more]virtual const char* techniqueDescription()
get a brief description of this technique
[more]virtual void getRequiredExtensions(std::vector<std::string> &xtensions*/) const
collect the GL extension strings which are required for this technique to work properly.
[more]virtual bool validate(osg::State &) const
tests whether this technique is valid for the current rendering context.
[more]virtual void accept(osg::NodeVisitor &nv, osg::Node* child)
traverses the child nodes with multipass if necessary.
[more]inline int getNumPasses() const
get the number of rendering passes defined in this technique
[more]inline osg::Group* getPassGroup(int i)
get the Group object associated to the i-th pass
[more]inline const osg::Group* getPassGroup(int i) const
get the const Group object associated to the i-th pass
[more]inline osg::StateSet* getPassStateSet(int i)
get the StateSet object associated to the i-th pass
[more]inline const osg::StateSet* getPassStateSet(int i) const
get the const StateSet object associated to the i-th pass
[more]inline osg::Group* getControlNode()
get the control node which holds the user's subgraph.
[more]inline const osg::Group* getControlNode() const
get the const control node which holds the user's subgraph
[more]inline void dirtyPasses()
force rebuilding of pass nodes on next traversal

Protected Methods

[more] Technique(const Technique &)
[more]virtual ~Technique()
[more]Technique& operator=(const Technique &)
[more]inline virtual osg::Node* getOverrideChild(int)
optional: return a node that overrides the child node on a specified pass
[more]void addPass(osg::StateSet* ss = 0)
create a new pass node, add it to the technique and associate a StateSet
[more]void addPass(osg::Group* pass)
add a new pass to the technique specifying an user-defined pass node.
[more]virtual void define_passes() = 0
define the rendering passes that make up this technique.


Documentation

This is the base class for effect techniques. A technique represents one of the possible ways to implement a special effect. This base class is abstract, you will have to subclass your own techniques for your custom effects. Derived classes will have to implement the define_passes() method to configure the rendering pass(es) that make up the technique. Usually you will create one StateSet object for each rendering pass and then you'll call addPass(stateset). The validate() method should return true if the technique is valid within the current rendering context, false otherwise. The default implementation of validate() calls getRequiredExtensions() and tests whether all required extensions are supported or not, returning false if at least one extension is not supported.
o Technique()

ovirtual const char* techniqueName()
get the name of this technique

ovirtual const char* techniqueDescription()
get a brief description of this technique

ovirtual void getRequiredExtensions(std::vector<std::string> &xtensions*/) const
collect the GL extension strings which are required for this technique to work properly. This method is called from the default implementation of validate().

ovirtual bool validate(osg::State &) const
tests whether this technique is valid for the current rendering context. The default behavior is to call getRequiredExtensions() and check for extension availability.

ovirtual void accept(osg::NodeVisitor &nv, osg::Node* child)
traverses the child nodes with multipass if necessary. Don't call this method directly as it is called by osgFX::Effect

o Technique(const Technique &)

ovirtual ~Technique()

oTechnique& operator=(const Technique &)

oinline virtual osg::Node* getOverrideChild(int)
optional: return a node that overrides the child node on a specified pass

ovoid addPass(osg::StateSet* ss = 0)
create a new pass node, add it to the technique and associate a StateSet

ovoid addPass(osg::Group* pass)
add a new pass to the technique specifying an user-defined pass node. You should call this version of addPass() only when you need to gain direct control over the pass node (i.e. for setting up a cull callback); otherwise please use addPass(StateSet*) and let the class create the pass node for you.

ovirtual void define_passes() = 0
define the rendering passes that make up this technique. You must implement this method in derived classes to add the required passes.

oinline int getNumPasses() const
get the number of rendering passes defined in this technique

oinline osg::Group* getPassGroup(int i)
get the Group object associated to the i-th pass

oinline const osg::Group* getPassGroup(int i) const
get the const Group object associated to the i-th pass

oinline osg::StateSet* getPassStateSet(int i)
get the StateSet object associated to the i-th pass

oinline const osg::StateSet* getPassStateSet(int i) const
get the const StateSet object associated to the i-th pass

oinline osg::Group* getControlNode()
get the control node which holds the user's subgraph. You may want to do something on it like applying a cull callback.

oinline const osg::Group* getControlNode() const
get the const control node which holds the user's subgraph

oinline void dirtyPasses()
force rebuilding of pass nodes on next traversal


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.