2003-09-08 18:51:14 +08:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
< HTML >
< HEAD >
< TITLE > class OSGFX_EXPORT osgFX::Effect< / TITLE >
2004-08-06 14:53:36 +08:00
< META NAME = "GENERATOR" CONTENT = "DOC++ 3.4.6" >
2003-09-08 18:51:14 +08:00
< / HEAD >
< BODY BGCOLOR = "#ffffff" >
< H2 > class OSGFX_EXPORT < A HREF = "#DOC.DOCU" > osgFX::Effect< / A > < / H2 > < / H2 > < BLOCKQUOTE > The base class for special effects.< / BLOCKQUOTE >
< HR >
< H2 > Inheritance:< / H2 >
< APPLET CODE = "ClassGraph.class" WIDTH = 600 HEIGHT = 215 >
2003-09-10 16:35:16 +08:00
< param name = classes value = "Mosg::Group,M,CEffect,MEffect.html,CSpecularHighlights,MSpecularHighlights.html,CScribe,MScribe.html,CCartoon,MCartoon.html,CBumpMapping,MBumpMapping.html,CAnisotropicLighting,MAnisotropicLighting.html" >
2003-09-08 18:51:14 +08:00
< param name = before value = "M,M,M|_,MR_,MR_,MR_,Mr_" >
< param name = after value = "Md_,M,M,M,M,M,M" >
< param name = indent value = "0,1,1,1,1,1,1" >
< param name = arrowdir value = "down" >
< / APPLET >
< HR >
< DL >
2004-08-06 14:53:36 +08:00
< P > < DL >
< DT > < H3 > Public Classes< / H3 > < DD > < DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > enum < B > < A HREF = "#DOC.2.4.10" > TechniqueSelection< / A > < / B >
< / DL > < / P >
2003-09-08 18:51:14 +08:00
< P > < DL >
< DT > < H3 > Public Methods< / H3 > < DD > < DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.2.4.1" > Effect< / A > < / B > ()
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > < B > < A HREF = "#DOC.2.4.2" > Effect< / A > < / B > (const <!1> < A HREF = "Effect.html#DOC.2.4.2" > Effect< / A > & copy, const osg::CopyOp & copyop = osg::CopyOp::SHALLOW_COPY)
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual inline bool < B > < A HREF = "#DOC.2.4.3" > isSameKindAs< / A > < / B > (const osg::Object* obj) const
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual inline const char* < B > < A HREF = "#DOC.2.4.4" > libraryName< / A > < / B > () const
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual inline const char* < B > < A HREF = "#DOC.2.4.5" > className< / A > < / B > () const
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual const char* < B > < A HREF = "#DOC.2.4.6" > effectName< / A > < / B > () const
2003-09-08 18:51:14 +08:00
< DD > < I > get the name of this effect < / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual const char* < B > < A HREF = "#DOC.2.4.7" > effectDescription< / A > < / B > () const
2003-09-08 18:51:14 +08:00
< DD > < I > get a brief description of this effect < / I >
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual const char* < B > < A HREF = "#DOC.2.4.8" > effectAuthor< / A > < / B > () const
2003-09-08 18:51:14 +08:00
< DD > < I > get the effect author's name < / I >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline virtual void < B > < A HREF = "#DOC.2.4.9" > setUpDemo< / A > < / B > ()
< DD > < I > optional: set effect parameters to produce a visually significant result to be used in demo applications like osgfxbrowser.< / I >
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual void < B > < A HREF = "#DOC.2.4.11" > traverse< / A > < / B > (osg::NodeVisitor & nv)
2003-09-10 16:35:16 +08:00
< DD > < I > custom traversal < / I >
2003-09-08 18:51:14 +08:00
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline bool < B > < A HREF = "#DOC.2.4.24" > getEnabled< / A > < / B > () const
2003-09-08 18:51:14 +08:00
< DD > < I > get whether the effect is enabled or not < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline void < B > < A HREF = "#DOC.2.4.25" > setEnabled< / A > < / B > (bool v)
2003-09-08 18:51:14 +08:00
< DD > < I > set whether the effect is enabled or not < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline int < B > < A HREF = "#DOC.2.4.26" > getNumTechniques< / A > < / B > () const
2003-09-08 18:51:14 +08:00
< DD > < I > get the number of techniques defined for this effect < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline <!1> < A HREF = "Technique.html" > Technique< / A > * < B > < A HREF = "#DOC.2.4.27" > getTechnique< / A > < / B > (int i)
2003-09-08 18:51:14 +08:00
< DD > < I > get the i-th technique < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline const <!1> < A HREF = "Technique.html" > Technique< / A > * < B > < A HREF = "#DOC.2.4.28" > getTechnique< / A > < / B > (int i) const
2003-09-08 18:51:14 +08:00
< DD > < I > get the i-th const technique < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline int < B > < A HREF = "#DOC.2.4.29" > getSelectedTechnique< / A > < / B > () const
2003-09-08 18:51:14 +08:00
< DD > < I > get the index of the currently selected technique < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline void < B > < A HREF = "#DOC.2.4.30" > selectTechnique< / A > < / B > (int i)
2003-09-08 18:51:14 +08:00
< DD > < I > select a technique or enable automatic detection < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline void < B > < A HREF = "#DOC.2.4.31" > addTechnique< / A > < / B > (<!1> < A HREF = "Technique.html" > Technique< / A > * tech)
2003-09-08 18:51:14 +08:00
< DD > < I > add a technique to the effect < / I >
< DT >
2003-09-10 16:35:16 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline void < B > < A HREF = "#DOC.2.4.32" > dirtyTechniques< / A > < / B > ()
2003-09-08 18:51:14 +08:00
< DD > < I > force rebuilding of techniques on next traversal < / I >
2003-09-10 16:35:16 +08:00
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > inline void < B > < A HREF = "#DOC.2.4.33" > inherited_traverse< / A > < / B > (osg::NodeVisitor & nv)
< DD > < I > default traversal < / I >
2003-09-08 18:51:14 +08:00
< / DL > < / P >
< P > < DL >
< DT > < H3 > Protected Methods< / H3 > < DD > < DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual < B > < A HREF = "#DOC.2.4.12" > ~Effect< / A > < / B > ()
< DT >
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > <!1> < A HREF = "Effect.html" > Effect< / A > & < B > < A HREF = "#DOC.2.4.13" > operator=< / A > < / B > (const <!1> < A HREF = "Effect.html" > Effect< / A > & )
< DT >
2004-08-06 14:53:36 +08:00
< IMG ALT = "[more]" BORDER = 0 SRC = icon1.gif > virtual bool < B > < A HREF = "#DOC.2.4.14" > define_techniques< / A > < / B > ()
2003-09-08 18:51:14 +08:00
< DD > < I > abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect.< / I >
< / DL > < / P >
< / DL >
< A NAME = "DOC.DOCU" > < / A >
< HR >
< H2 > Documentation< / H2 >
< BLOCKQUOTE >
The base class for special effects. An effect is basically a collection of
state attributes and an interface for configuring them in a predefined
fashion. The Effect class does more however, as it handles multipass
rendering transparently and it allows more than one "technique" to be
defined. Each technique tries to implement the effect in a different way,
often using different OpenGL extensions. The active technique can be
selected either manually, with selectTechnique(), or automatically, in which
case the first technique that is supported by all active rendering contexts
is chosen.
2003-09-10 16:35:16 +08:00
If you are an Effect user, then simply use it as a node group. Create an
instance of your desired effect, add it to your scene graph and call its
addChild() method to add a child node as you would do with a Group.
2003-09-08 18:51:14 +08:00
If you are an Effect developer, you will have to implement the method
define_techniques() to define the different techniques that can be used
for obtaining the desired effect. In define_techniques() you will usually
create one or more instances of custom classes derived from Technique and
you will add them to the effect with addTechnique(). The order is important:
techniques added first will have higher priority and will be used first as
soon as all rendering contexts support it.< / BLOCKQUOTE >
< DL >
< A NAME = "Effect" > < / A >
< A NAME = "DOC.2.4.1" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > Effect()< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "Effect" > < / A >
< A NAME = "DOC.2.4.2" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > Effect(const <!1> < A HREF = "Effect.html#DOC.2.4.2" > Effect< / A > & copy, const osg::CopyOp & copyop = osg::CopyOp::SHALLOW_COPY)< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "isSameKindAs" > < / A >
< A NAME = "DOC.2.4.3" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual inline bool isSameKindAs(const osg::Object* obj) const < / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "libraryName" > < / A >
< A NAME = "DOC.2.4.4" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual inline const char* libraryName() const < / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "className" > < / A >
< A NAME = "DOC.2.4.5" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual inline const char* className() const < / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "effectName" > < / A >
< A NAME = "DOC.2.4.6" > < / A >
2004-08-06 14:53:36 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual const char* effectName() const < / B > < / TT >
2003-09-08 18:51:14 +08:00
< DD > get the name of this effect
< DL > < DT > < DD > < / DL > < P >
< A NAME = "effectDescription" > < / A >
< A NAME = "DOC.2.4.7" > < / A >
2004-08-06 14:53:36 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual const char* effectDescription() const < / B > < / TT >
2003-09-08 18:51:14 +08:00
< DD > get a brief description of this effect
< DL > < DT > < DD > < / DL > < P >
< A NAME = "effectAuthor" > < / A >
< A NAME = "DOC.2.4.8" > < / A >
2004-08-06 14:53:36 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual const char* effectAuthor() const < / B > < / TT >
2003-09-08 18:51:14 +08:00
< DD > get the effect author's name
< DL > < DT > < DD > < / DL > < P >
< A NAME = "setUpDemo" > < / A >
< A NAME = "DOC.2.4.9" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline virtual void setUpDemo()< / B > < / TT >
< DD >
optional: set effect parameters to produce a visually significant
result to be used in demo applications like osgfxbrowser. Default
is to do nothing.
< DL > < DT > < DD > < / DL > < P >
< A NAME = "TechniqueSelection" > < / A >
< A NAME = "DOC.2.4.10" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > enum TechniqueSelection< / B > < / TT >
< DL > < DT > < DD > < / DL > < P > < DL >
< A NAME = "AUTO_DETECT" > < / A >
< A NAME = "DOC.2.4.10.1" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > AUTO_DETECT< / B > < / TT >
< DL > < DT > < DD > < / DL > < P > < / DL >
< A NAME = "traverse" > < / A >
< A NAME = "DOC.2.4.11" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual void traverse(osg::NodeVisitor & nv)< / B > < / TT >
2003-09-10 16:35:16 +08:00
< DD > custom traversal
2003-09-08 18:51:14 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "~Effect" > < / A >
< A NAME = "DOC.2.4.12" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual ~Effect()< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "operator=" > < / A >
< A NAME = "DOC.2.4.13" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > <!1> < A HREF = "Effect.html" > Effect< / A > & operator=(const <!1> < A HREF = "Effect.html" > Effect< / A > & )< / B > < / TT >
< DL > < DT > < DD > < / DL > < P >
< A NAME = "define_techniques" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.14" > < / A >
2004-08-06 14:53:36 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > virtual bool define_techniques()< / B > < / TT >
2003-09-08 18:51:14 +08:00
< DD >
abstract method to be implemented in derived classes; its purpose
if to create the techniques that can be used for obtaining the
desired effect. You will usually call addTechnique() inside
this method.
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getEnabled" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.24" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline bool getEnabled() const < / B > < / TT >
< DD > get whether the effect is enabled or not
< DL > < DT > < DD > < / DL > < P >
< A NAME = "setEnabled" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.25" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline void setEnabled(bool v)< / B > < / TT >
< DD > set whether the effect is enabled or not
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getNumTechniques" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.26" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline int getNumTechniques() const < / B > < / TT >
< DD > get the number of techniques defined for this effect
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getTechnique" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.27" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline <!1> < A HREF = "Technique.html" > Technique< / A > * getTechnique(int i)< / B > < / TT >
< DD > get the i-th technique
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getTechnique" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.28" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline const <!1> < A HREF = "Technique.html" > Technique< / A > * getTechnique(int i) const < / B > < / TT >
< DD > get the i-th const technique
< DL > < DT > < DD > < / DL > < P >
< A NAME = "getSelectedTechnique" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.29" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline int getSelectedTechnique() const < / B > < / TT >
< DD > get the index of the currently selected technique
< DL > < DT > < DD > < / DL > < P >
< A NAME = "selectTechnique" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.30" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline void selectTechnique(int i)< / B > < / TT >
< DD > select a technique or enable automatic detection
< DL > < DT > < DD > < / DL > < P >
< A NAME = "addTechnique" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.31" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline void addTechnique(<!1> < A HREF = "Technique.html" > Technique< / A > * tech)< / B > < / TT >
< DD > add a technique to the effect
< DL > < DT > < DD > < / DL > < P >
< A NAME = "dirtyTechniques" > < / A >
2003-09-10 16:35:16 +08:00
< A NAME = "DOC.2.4.32" > < / A >
2003-09-08 18:51:14 +08:00
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline void dirtyTechniques()< / B > < / TT >
< DD > force rebuilding of techniques on next traversal
2003-09-10 16:35:16 +08:00
< DL > < DT > < DD > < / DL > < P >
< A NAME = "inherited_traverse" > < / A >
< A NAME = "DOC.2.4.33" > < / A >
< DT > < IMG ALT = "o" BORDER = 0 SRC = icon2.gif > < TT > < B > inline void inherited_traverse(osg::NodeVisitor & nv)< / B > < / TT >
< DD > default traversal
2003-09-08 18:51:14 +08:00
< DL > < DT > < DD > < / DL > < P > < / DL >
< HR >
< DL > < DT > < B > Direct child classes:
< / B > < DD > < A HREF = "SpecularHighlights.html" > SpecularHighlights< / A > < BR >
< A HREF = "Scribe.html" > Scribe< / A > < BR >
< A HREF = "Cartoon.html" > Cartoon< / A > < BR >
< A HREF = "BumpMapping.html" > BumpMapping< / A > < BR >
< A HREF = "AnisotropicLighting.html" > AnisotropicLighting< / A > < BR >
< / DL >
< DL > < DT > < DT > < B > Friends:< / B > < DD > class <!1> < A HREF = "Validator.html" > Validator< / A > < BR > < DD > < / DL > < P > < P > < I > < A HREF = "index.html" > Alphabetic index< / A > < / I > < I > < A HREF = "HIER.html" > HTML hierarchy of classes< / A > or < A HREF = "HIERjava.html" > Java< / A > < / I > < / P > < HR >
< BR >
2004-08-06 14:53:36 +08:00
This page was generated with the help of < A HREF = "http://www.linuxsupportline.com/~doc++" > DOC++< / A > .
2003-09-08 18:51:14 +08:00
< / BODY >
< / HTML >