OpenWalnut
1.4.0
|
00001 //--------------------------------------------------------------------------- 00002 // 00003 // Project: OpenWalnut ( http://www.openwalnut.org ) 00004 // 00005 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS 00006 // For more information see http://www.openwalnut.org/copying 00007 // 00008 // This file is part of OpenWalnut. 00009 // 00010 // OpenWalnut is free software: you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as published by 00012 // the Free Software Foundation, either version 3 of the License, or 00013 // (at your option) any later version. 00014 // 00015 // OpenWalnut is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 // GNU Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public License 00021 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>. 00022 // 00023 //--------------------------------------------------------------------------- 00024 00025 #ifndef WGEPOSTPROCESSORGAUSS_H 00026 #define WGEPOSTPROCESSORGAUSS_H 00027 00028 #include <boost/shared_ptr.hpp> 00029 00030 #include <osg/Texture2D> 00031 00032 #include "WGEPostprocessor.h" 00033 00034 /** 00035 * 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 00036 * exact list of textures to filter in one pass, use the alternative \ref create call. 00037 */ 00038 class WGEPostprocessorGauss: public WGEPostprocessor 00039 { 00040 public: 00041 /** 00042 * Convenience typedef for a boost::shared_ptr< WGEPostprocessorGauss >. 00043 */ 00044 typedef boost::shared_ptr< WGEPostprocessorGauss > SPtr; 00045 00046 /** 00047 * Convenience typedef for a boost::shared_ptr< const WGEPostprocessorGauss >. 00048 */ 00049 typedef boost::shared_ptr< const WGEPostprocessorGauss > ConstSPtr; 00050 00051 /** 00052 * Default constructor. 00053 */ 00054 WGEPostprocessorGauss(); 00055 00056 /** 00057 * Constructor. We implement a public constructor which can take more textures as input 00058 * 00059 * \param offscreen use this offscreen node to add your texture pass' 00060 * \param tex0 texture to filter 00061 * \param tex1 texture to filter 00062 * \param tex2 texture to filter 00063 * \param tex3 texture to filter 00064 * \param tex4 texture to filter 00065 * \param tex5 texture to filter 00066 * \param tex6 texture to filter 00067 * \param tex7 texture to filter 00068 */ 00069 WGEPostprocessorGauss( osg::ref_ptr< WGEOffscreenRenderNode > offscreen, 00070 osg::ref_ptr< osg::Texture2D > tex0, 00071 osg::ref_ptr< osg::Texture2D > tex1 = osg::ref_ptr< osg::Texture2D >(), 00072 osg::ref_ptr< osg::Texture2D > tex2 = osg::ref_ptr< osg::Texture2D >(), 00073 osg::ref_ptr< osg::Texture2D > tex3 = osg::ref_ptr< osg::Texture2D >(), 00074 osg::ref_ptr< osg::Texture2D > tex4 = osg::ref_ptr< osg::Texture2D >(), 00075 osg::ref_ptr< osg::Texture2D > tex5 = osg::ref_ptr< osg::Texture2D >(), 00076 osg::ref_ptr< osg::Texture2D > tex6 = osg::ref_ptr< osg::Texture2D >(), 00077 osg::ref_ptr< osg::Texture2D > tex7 = osg::ref_ptr< osg::Texture2D >() ); 00078 00079 /** 00080 * Destructor. 00081 */ 00082 virtual ~WGEPostprocessorGauss(); 00083 00084 /** 00085 * Create instance. Uses the protected constructor. Implement it if you derive from this class! 00086 * 00087 * \param offscreen use this offscreen node to add your texture pass' 00088 * \param gbuffer the input textures you should use 00089 * \returns shared pointer to the created instance 00090 */ 00091 virtual WGEPostprocessor::SPtr create( osg::ref_ptr< WGEOffscreenRenderNode > offscreen, 00092 const PostprocessorInput& gbuffer ) const; 00093 protected: 00094 private: 00095 }; 00096 00097 #endif // WGEPOSTPROCESSORGAUSS_H 00098