OpenWalnut  1.4.0
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:

Classes

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

Public Types

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

Protected Attributes

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

Private Attributes

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

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.

Detailed Description

Image Overlay Effect.

Definition at line 37 of file WGEViewerEffectImageOverlay.h.

Member Typedef Documentation

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

Definition at line 48 of file WGEViewerEffectImageOverlay.h.

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

Definition at line 43 of file WGEViewerEffectImageOverlay.h.

Constructor & Destructor Documentation

WGEViewerEffectImageOverlay::WGEViewerEffectImageOverlay ( )
WGEViewerEffectImageOverlay::~WGEViewerEffectImageOverlay ( )
virtual

Destructor.

Definition at line 95 of file WGEViewerEffectImageOverlay.cpp.

Member Function Documentation

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

Query current reference viewer.

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

Definition at line 105 of file WGEViewerEffectImageOverlay.cpp.

References m_viewer.

void WGEViewerEffectImageOverlay::setReferenceViewer ( boost::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 100 of file WGEViewerEffectImageOverlay.cpp.

References m_viewer.

Member Data Documentation

bool WGEViewerEffectImageOverlay::m_forceReload
protected

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

Definition at line 114 of file WGEViewerEffectImageOverlay.h.

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

WPropFilename WGEViewerEffectImageOverlay::m_image
protected

The filename to load.

Definition at line 104 of file WGEViewerEffectImageOverlay.h.

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

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

Height of the image in pixels.

Definition at line 84 of file WGEViewerEffectImageOverlay.h.

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

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

Width of the image in pixels.

Definition at line 79 of file WGEViewerEffectImageOverlay.h.

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

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

Update callback for the viewport.

Definition at line 134 of file WGEViewerEffectImageOverlay.h.

Referenced by WGEViewerEffectImageOverlay().

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

The viewer used to query the current reference cam.

Definition at line 99 of file WGEViewerEffectImageOverlay.h.

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

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

Height of the viewport in pixels.

Definition at line 94 of file WGEViewerEffectImageOverlay.h.

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

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

Width of the viewport in pixels.

Definition at line 89 of file WGEViewerEffectImageOverlay.h.

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


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