25 #ifndef WGECOLORMAPPING_H
26 #define WGECOLORMAPPING_H
34 #include <boost/signals2/signal.hpp>
35 #include <boost/function.hpp>
39 #include "../common/WBoundingBox.h"
40 #include "../common/WSharedSequenceContainer.h"
41 #include "../common/WSharedAssociativeContainer.h"
42 #include "../common/math/linearAlgebra/WLinearAlgebra.h"
44 #include "callbacks/WGEFunctorCallback.h"
46 #include "WGETexture.h"
47 #include "shaders/WGEShader.h"
48 #include "WExportWGE.h"
86 typedef boost::function< void ( osg::ref_ptr< WGETexture3D >, osg::ref_ptr< WGETexture3D > ) >
TextureReplaceHandler;
103 static boost::shared_ptr< WGEColormapping > instance();
108 typedef std::vector< osg::ref_ptr< osg::Node > >
NodeList;
121 osg::ref_ptr< WGEShader > shader = osg::ref_ptr< WGEShader >(),
size_t startTexUnit = 0 );
134 osg::ref_ptr< WGEShader > shader = osg::ref_ptr< WGEShader >(),
size_t startTexUnit = 0 );
144 static void apply( osg::ref_ptr< osg::Node > node, osg::ref_ptr< WGEShader > shader = osg::ref_ptr< WGEShader >(),
size_t startTexUnit = 0 );
155 osg::ref_ptr< WGEShader > shader = osg::ref_ptr< WGEShader >(),
size_t startTexUnit = 0 );
164 static void registerTexture( osg::ref_ptr< WGETexture3D > texture, std::string name =
"" );
172 static void deregisterTexture( osg::ref_ptr< WGETexture3D > texture );
182 static void replaceTexture( osg::ref_ptr< WGETexture3D > old, osg::ref_ptr< WGETexture3D > newTex, std::string name =
"" );
190 template <
typename Comparator >
191 void sort( Comparator comp );
199 bool moveUp( osg::ref_ptr< WGETexture3D > texture );
207 bool moveDown( osg::ref_ptr< WGETexture3D > texture );
236 boost::signals2::connection subscribeSignal( TextureListSignal signal, TextureRegisterHandler notifier );
246 boost::signals2::connection subscribeSignal( TextureListSignal signal, TextureReplaceHandler notifier );
256 boost::signals2::connection subscribeSignal( TextureListSignal signal, TextureSortHandler notifier );
263 TextureContainerType::ReadTicket getReadTicket();
299 osg::ref_ptr< WGEShader > shader = osg::ref_ptr< WGEShader >(),
size_t startTexUnit = 0 );
307 void registerTextureInst( osg::ref_ptr< WGETexture3D > texture, std::string name );
314 void deregisterTextureInst( osg::ref_ptr< WGETexture3D > texture );
324 void replaceTextureInst( osg::ref_ptr< WGETexture3D > old, osg::ref_ptr< WGETexture3D > newTex, std::string name =
"" );
332 void callback( osg::Node* node );
337 void textureUpdate();
379 boost::signals2::signal< void( osg::ref_ptr< WGETexture3D > ) > m_registerSignal;
384 boost::signals2::signal< void( osg::ref_ptr< WGETexture3D > ) > m_deregisterSignal;
389 boost::signals2::signal< void( osg::ref_ptr< WGETexture3D >, osg::ref_ptr< WGETexture3D > ) > m_replaceSignal;
407 template <
typename Comparator >
413 #endif // WGECOLORMAPPING_H