OpenWalnut  1.5.0dev
Classes | Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
WGEViewerEffectImageOverlay Class Reference

Image Overlay Effect. More...

#include <WGEViewerEffectImageOverlay.h>

+ Inheritance diagram for WGEViewerEffectImageOverlay:
+ Collaboration diagram for WGEViewerEffectImageOverlay:

Classes

class  Updater
 Update the uniforms and textures if needed. More...
 

Public Types

typedef osg::ref_ptr< WGEViewerEffectImageOverlaySPtr
 Convenience typedef for a std::shared_ptr< WGEViewerEffectImageOverlay >. More...
 
typedef osg::ref_ptr< const WGEViewerEffectImageOverlayConstSPtr
 Convenience typedef for a std::shared_ptr< const WGEViewerEffectImageOverlay >. More...
 
- Public Types inherited from WGEViewerEffect
typedef osg::ref_ptr< WGEViewerEffectSPtr
 Convenience typedef for a std::shared_ptr< WGEViewerEffect >. More...
 
typedef osg::ref_ptr< const WGEViewerEffectConstSPtr
 Convenience typedef for a std::shared_ptr< const WGEViewerEffect >. More...
 
- Public Types inherited from WObjectNDIP< WGECamera >
typedef std::shared_ptr< WObjectNDIPSPtr
 Shared ptr to an instance. More...
 
typedef std::shared_ptr< const WObjectNDIPConstSPtr
 Shared ptr to a const instance. More...
 
- Public Types inherited from WGECamera
enum  ProjectionMode { ORTHOGRAPHIC , PERSPECTIVE , TWO_D , TWO_D_UNIT }
 List of possible camera modes. More...
 

Public Member Functions

 WGEViewerEffectImageOverlay ()
 Default constructor. More...
 
virtual ~WGEViewerEffectImageOverlay ()
 Destructor. More...
 
void setReferenceViewer (std::shared_ptr< WGEViewer > viewer)
 Set the reference viewer. More...
 
const std::shared_ptr< WGEViewergetReferenceViewer () const
 Query current reference viewer. More...
 
- Public Member Functions inherited from WGEViewerEffect
 WGEViewerEffect (std::string name, std::string description, const char **icon=NULL)
 Create the effect. More...
 
virtual ~WGEViewerEffect ()
 Destructor. More...
 
virtual bool isEnabled () const
 Check whether the effect is active or not. More...
 
virtual void setEnabled (bool enable=true)
 Set the effect enabled. More...
 
virtual void setEnabledByDefault (bool enableByDefault=true)
 Use this to activate an effect by default. More...
 
- Public Member Functions inherited from WObjectNDIP< WGECamera >
virtual ~WObjectNDIP ()
 Destructor. More...
 
virtual std::string getName () const
 The name of the object. More...
 
virtual std::string getDescription () const
 The description of this object. More...
 
virtual const char ** getIcon () const
 The icon of this object. More...
 
virtual WProperties::SPtr getProperties ()
 Return the property group of this object. More...
 
- Public Member Functions inherited from WGECamera
 WGECamera (int width, int height, ProjectionMode projectionMode)
 Constructor which sets defaults. More...
 
 WGECamera ()
 Constructor which sets defaults. More...
 
void setDefaultProjectionMode (ProjectionMode mode)
 Sets the default projection mode used for cameras getting reset. More...
 
ProjectionMode getDefaultProjectionMode ()
 Returns the current default projection mode. More...
 
void reset ()
 Resets the camera and activates the prior set defaults. More...
 
void resize ()
 Change camera parameters which should be changed on a resize. More...
 

Protected Attributes

osg::ref_ptr< osg::Uniform > m_overlayWidth
 Width of the image in pixels. More...
 
osg::ref_ptr< osg::Uniform > m_overlayHeight
 Height of the image in pixels. More...
 
osg::ref_ptr< osg::Uniform > m_viewportWidth
 Width of the viewport in pixels. More...
 
osg::ref_ptr< osg::Uniform > m_viewportHeight
 Height of the viewport in pixels. More...
 
std::shared_ptr< WGEViewerm_viewer
 The viewer used to query the current reference cam. More...
 
WPropFilename m_image
 The filename to load. More...
 
WPropBool m_blendOutAuto
 Enable to blend out the overlay. More...
 
WPropDouble m_blendOutDuration
 Time to blend out in seconds. More...
 
osg::ref_ptr< WGEShaderAnimationCallbackm_animationCallback
 Animate blend out sequence. More...
 
osg::ref_ptr< osg::Texture2D > m_logoTexture
 The texture. More...
 
bool m_forceReload
 If true, the update callback is forced to reload the image. More...
 
- Protected Attributes inherited from WGEViewerEffect
osg::ref_ptr< osg::Geode > m_geode
 The fullscreen quad. More...
 
osg::ref_ptr< osg::StateSet > m_state
 The stateset of the cam. More...
 
WPropBool m_active
 Enable or disable effect. More...
 
- Protected Attributes inherited from WObjectNDIP< WGECamera >
WProperties::SPtr m_properties
 the properties of the object. More...
 
- Protected Attributes inherited from WGECamera
ProjectionMode m_DefProjMode
 The projection mode used as default. More...
 

Private Attributes

osg::ref_ptr< Updaterm_updater
 Update callback for the viewport. More...
 

Additional Inherited Members

- Protected Member Functions inherited from WObjectNDIP< WGECamera >
 WObjectNDIP (std::string name, std::string description, const char **icon=NULL)
 Construct a NDIP'ed object. More...
 
- Protected Member Functions inherited from WGECamera
virtual ~WGECamera ()
 Destructor. More...
 

Detailed Description

Image Overlay Effect.

Definition at line 41 of file WGEViewerEffectImageOverlay.h.

Member Typedef Documentation

◆ ConstSPtr

Convenience typedef for a std::shared_ptr< const WGEViewerEffectImageOverlay >.

Definition at line 52 of file WGEViewerEffectImageOverlay.h.

◆ SPtr

Convenience typedef for a std::shared_ptr< WGEViewerEffectImageOverlay >.

Definition at line 47 of file WGEViewerEffectImageOverlay.h.

Constructor & Destructor Documentation

◆ WGEViewerEffectImageOverlay()

WGEViewerEffectImageOverlay::WGEViewerEffectImageOverlay ( )

◆ ~WGEViewerEffectImageOverlay()

WGEViewerEffectImageOverlay::~WGEViewerEffectImageOverlay ( )
virtual

Destructor.

Definition at line 118 of file WGEViewerEffectImageOverlay.cpp.

Member Function Documentation

◆ getReferenceViewer()

const std::shared_ptr< WGEViewer > WGEViewerEffectImageOverlay::getReferenceViewer ( ) const

Query current reference viewer.

Returns
the reference viewer or NULL if none has been set.

Definition at line 128 of file WGEViewerEffectImageOverlay.cpp.

References m_viewer.

◆ setReferenceViewer()

void WGEViewerEffectImageOverlay::setReferenceViewer ( std::shared_ptr< WGEViewer viewer)

Set the reference viewer.

Needed as the effect itself is not able to query important camera states. This can be the viewer on which the effect is applied but does not have to. Important is a valid WGECamera, including a properly setup viewport.

Parameters
viewerthe viewer in which the effect is used.

Definition at line 123 of file WGEViewerEffectImageOverlay.cpp.

References m_viewer.

Member Data Documentation

◆ m_animationCallback

osg::ref_ptr< WGEShaderAnimationCallback > WGEViewerEffectImageOverlay::m_animationCallback
protected

Animate blend out sequence.

Definition at line 123 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay().

◆ m_blendOutAuto

WPropBool WGEViewerEffectImageOverlay::m_blendOutAuto
protected

Enable to blend out the overlay.

Definition at line 113 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay().

◆ m_blendOutDuration

WPropDouble WGEViewerEffectImageOverlay::m_blendOutDuration
protected

Time to blend out in seconds.

Definition at line 118 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay().

◆ m_forceReload

bool WGEViewerEffectImageOverlay::m_forceReload
protected

If true, the update callback is forced to reload the image.

Definition at line 133 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay::Updater::operator()(), and WGEViewerEffectImageOverlay().

◆ m_image

WPropFilename WGEViewerEffectImageOverlay::m_image
protected

The filename to load.

Definition at line 108 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay::Updater::operator()(), and WGEViewerEffectImageOverlay().

◆ m_logoTexture

osg::ref_ptr< osg::Texture2D > WGEViewerEffectImageOverlay::m_logoTexture
protected

◆ m_overlayHeight

osg::ref_ptr< osg::Uniform > WGEViewerEffectImageOverlay::m_overlayHeight
protected

Height of the image in pixels.

Definition at line 88 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay::Updater::operator()(), and WGEViewerEffectImageOverlay().

◆ m_overlayWidth

osg::ref_ptr< osg::Uniform > WGEViewerEffectImageOverlay::m_overlayWidth
protected

Width of the image in pixels.

Definition at line 83 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay::Updater::operator()(), and WGEViewerEffectImageOverlay().

◆ m_updater

osg::ref_ptr< Updater > WGEViewerEffectImageOverlay::m_updater
private

Update callback for the viewport.

Definition at line 153 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay().

◆ m_viewer

std::shared_ptr< WGEViewer > WGEViewerEffectImageOverlay::m_viewer
protected

The viewer used to query the current reference cam.

Definition at line 103 of file WGEViewerEffectImageOverlay.h.

Referenced by getReferenceViewer(), WGEViewerEffectImageOverlay::Updater::operator()(), and setReferenceViewer().

◆ m_viewportHeight

osg::ref_ptr< osg::Uniform > WGEViewerEffectImageOverlay::m_viewportHeight
protected

Height of the viewport in pixels.

Definition at line 98 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay::Updater::operator()(), and WGEViewerEffectImageOverlay().

◆ m_viewportWidth

osg::ref_ptr< osg::Uniform > WGEViewerEffectImageOverlay::m_viewportWidth
protected

Width of the viewport in pixels.

Definition at line 93 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay::Updater::operator()(), and WGEViewerEffectImageOverlay().


The documentation for this class was generated from the following files: