OpenWalnut  1.4.0
WGEPostprocessorGauss.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WGEPOSTPROCESSORGAUSS_H
26 #define WGEPOSTPROCESSORGAUSS_H
27 
28 #ifndef Q_MOC_RUN
29 #include <boost/shared_ptr.hpp>
30 #endif
31 
32 #include <osg/Texture2D>
33 
34 #include "WGEPostprocessor.h"
35 
36 /**
37  * Gauss filtering of the input. It does filter all the textures you bind on it and returns a gauss filtered version. If you want to define the
38  * exact list of textures to filter in one pass, use the alternative \ref create call.
39  */
41 {
42 public:
43  /**
44  * Convenience typedef for a boost::shared_ptr< WGEPostprocessorGauss >.
45  */
46  typedef boost::shared_ptr< WGEPostprocessorGauss > SPtr;
47 
48  /**
49  * Convenience typedef for a boost::shared_ptr< const WGEPostprocessorGauss >.
50  */
51  typedef boost::shared_ptr< const WGEPostprocessorGauss > ConstSPtr;
52 
53  /**
54  * Default constructor.
55  */
57 
58  /**
59  * Constructor. We implement a public constructor which can take more textures as input
60  *
61  * \param offscreen use this offscreen node to add your texture pass'
62  * \param tex0 texture to filter
63  * \param tex1 texture to filter
64  * \param tex2 texture to filter
65  * \param tex3 texture to filter
66  * \param tex4 texture to filter
67  * \param tex5 texture to filter
68  * \param tex6 texture to filter
69  * \param tex7 texture to filter
70  */
71  WGEPostprocessorGauss( osg::ref_ptr< WGEOffscreenRenderNode > offscreen,
72  osg::ref_ptr< osg::Texture2D > tex0,
73  osg::ref_ptr< osg::Texture2D > tex1 = osg::ref_ptr< osg::Texture2D >(),
74  osg::ref_ptr< osg::Texture2D > tex2 = osg::ref_ptr< osg::Texture2D >(),
75  osg::ref_ptr< osg::Texture2D > tex3 = osg::ref_ptr< osg::Texture2D >(),
76  osg::ref_ptr< osg::Texture2D > tex4 = osg::ref_ptr< osg::Texture2D >(),
77  osg::ref_ptr< osg::Texture2D > tex5 = osg::ref_ptr< osg::Texture2D >(),
78  osg::ref_ptr< osg::Texture2D > tex6 = osg::ref_ptr< osg::Texture2D >(),
79  osg::ref_ptr< osg::Texture2D > tex7 = osg::ref_ptr< osg::Texture2D >() );
80 
81  /**
82  * Destructor.
83  */
84  virtual ~WGEPostprocessorGauss();
85 
86  /**
87  * Create instance. Uses the protected constructor. Implement it if you derive from this class!
88  *
89  * \param offscreen use this offscreen node to add your texture pass'
90  * \param gbuffer the input textures you should use
91  * \returns shared pointer to the created instance
92  */
93  virtual WGEPostprocessor::SPtr create( osg::ref_ptr< WGEOffscreenRenderNode > offscreen,
94  const PostprocessorInput& gbuffer ) const;
95 protected:
96 private:
97 };
98 
99 #endif // WGEPOSTPROCESSORGAUSS_H
100 
boost::shared_ptr< WGEPostprocessorGauss > SPtr
Convenience typedef for a boost::shared_ptr< WGEPostprocessorGauss >.
This class encapsulates a G-Buffer.
WGEPostprocessorGauss()
Default constructor.
boost::shared_ptr< WGEPostprocessor > SPtr
Convenience typedef for an osg::ref_ptr< WGEPostprocessor >.
Gauss filtering of the input.
The base class for all custom post-processors.
virtual WGEPostprocessor::SPtr create(osg::ref_ptr< WGEOffscreenRenderNode > offscreen, const PostprocessorInput &gbuffer) const
Create instance.
boost::shared_ptr< const WGEPostprocessorGauss > ConstSPtr
Convenience typedef for a boost::shared_ptr< const WGEPostprocessorGauss >.
virtual ~WGEPostprocessorGauss()
Destructor.