OpenWalnut  1.5.0dev
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 #include <memory>
29 
30 #include <osg/Texture2D>
31 
32 #include "WGEPostprocessor.h"
33 
34 /**
35  * 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
36  * exact list of textures to filter in one pass, use the alternative \ref create call.
37  */
39 {
40 public:
41  /**
42  * Convenience typedef for a std::shared_ptr< WGEPostprocessorGauss >.
43  */
44  typedef std::shared_ptr< WGEPostprocessorGauss > SPtr;
45 
46  /**
47  * Convenience typedef for a std::shared_ptr< const WGEPostprocessorGauss >.
48  */
49  typedef std::shared_ptr< const WGEPostprocessorGauss > ConstSPtr;
50 
51  /**
52  * Default constructor.
53  */
55 
56  /**
57  * Constructor. We implement a public constructor which can take more textures as input
58  *
59  * \param offscreen use this offscreen node to add your texture pass'
60  * \param tex0 texture to filter
61  * \param tex1 texture to filter
62  * \param tex2 texture to filter
63  * \param tex3 texture to filter
64  * \param tex4 texture to filter
65  * \param tex5 texture to filter
66  * \param tex6 texture to filter
67  * \param tex7 texture to filter
68  */
69  WGEPostprocessorGauss( osg::ref_ptr< WGEOffscreenRenderNode > offscreen,
70  osg::ref_ptr< osg::Texture2D > tex0,
71  osg::ref_ptr< osg::Texture2D > tex1 = osg::ref_ptr< osg::Texture2D >(),
72  osg::ref_ptr< osg::Texture2D > tex2 = osg::ref_ptr< osg::Texture2D >(),
73  osg::ref_ptr< osg::Texture2D > tex3 = osg::ref_ptr< osg::Texture2D >(),
74  osg::ref_ptr< osg::Texture2D > tex4 = osg::ref_ptr< osg::Texture2D >(),
75  osg::ref_ptr< osg::Texture2D > tex5 = osg::ref_ptr< osg::Texture2D >(),
76  osg::ref_ptr< osg::Texture2D > tex6 = osg::ref_ptr< osg::Texture2D >(),
77  osg::ref_ptr< osg::Texture2D > tex7 = osg::ref_ptr< osg::Texture2D >() );
78 
79  /**
80  * Destructor.
81  */
82  virtual ~WGEPostprocessorGauss();
83 
84  /**
85  * Create instance. Uses the protected constructor. Implement it if you derive from this class!
86  *
87  * \param offscreen use this offscreen node to add your texture pass'
88  * \param gbuffer the input textures you should use
89  * \returns shared pointer to the created instance
90  */
91  virtual WGEPostprocessor::SPtr create( osg::ref_ptr< WGEOffscreenRenderNode > offscreen,
92  const PostprocessorInput& gbuffer ) const;
93 protected:
94 private:
95 };
96 
97 #endif // WGEPOSTPROCESSORGAUSS_H
98 
Gauss filtering of the input.
virtual ~WGEPostprocessorGauss()
Destructor.
std::shared_ptr< const WGEPostprocessorGauss > ConstSPtr
Convenience typedef for a std::shared_ptr< const WGEPostprocessorGauss >.
std::shared_ptr< WGEPostprocessorGauss > SPtr
Convenience typedef for a std::shared_ptr< WGEPostprocessorGauss >.
WGEPostprocessorGauss()
Default constructor.
virtual WGEPostprocessor::SPtr create(osg::ref_ptr< WGEOffscreenRenderNode > offscreen, const PostprocessorInput &gbuffer) const
Create instance.
This class encapsulates a G-Buffer.
The base class for all custom post-processors.
std::shared_ptr< WGEPostprocessor > SPtr
Convenience typedef for an osg::ref_ptr< WGEPostprocessor >.