OpenWalnut  1.4.0
Public Types | Public Member Functions | Protected Attributes | List of all members
WGEViewerEffect Class Reference

Base class for implementing basic fullscreen effects for the WGEViewer. More...

#include <WGEViewerEffect.h>

+ Inheritance diagram for WGEViewerEffect:

Public Types

typedef osg::ref_ptr
< WGEViewerEffect
SPtr
 Convenience typedef for a boost::shared_ptr< WGEViewerEffect >. More...
 
typedef osg::ref_ptr< const
WGEViewerEffect
ConstSPtr
 Convenience typedef for a boost::shared_ptr< const WGEViewerEffect >. More...
 
- Public Types inherited from WObjectNDIP< WGECamera >
typedef boost::shared_ptr
< WObjectNDIP
SPtr
 Shared ptr to an instance. More...
 
typedef boost::shared_ptr
< const WObjectNDIP
ConstSPtr
 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

 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::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...
 

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

Base class for implementing basic fullscreen effects for the WGEViewer.

It uses properties for configuration.

Definition at line 42 of file WGEViewerEffect.h.

Member Typedef Documentation

typedef osg::ref_ptr< const WGEViewerEffect > WGEViewerEffect::ConstSPtr

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

Definition at line 53 of file WGEViewerEffect.h.

typedef osg::ref_ptr< WGEViewerEffect > WGEViewerEffect::SPtr

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

Definition at line 48 of file WGEViewerEffect.h.

Constructor & Destructor Documentation

WGEViewerEffect::WGEViewerEffect ( std::string  name,
std::string  description,
const char **  icon = NULL 
)

Create the effect.

Parameters
namethe name
descriptionthe description
iconan icon in XPM format. Can be NULL if no icon is required.

Definition at line 35 of file WGEViewerEffect.cpp.

References wge::genFinitePlane(), m_active, m_geode, WObjectNDIP< WGECamera >::m_properties, and m_state.

WGEViewerEffect::~WGEViewerEffect ( )
virtual

Destructor.

Definition at line 76 of file WGEViewerEffect.cpp.

Member Function Documentation

bool WGEViewerEffect::isEnabled ( ) const
virtual

Check whether the effect is active or not.

Returns
true if active

Definition at line 81 of file WGEViewerEffect.cpp.

References m_active.

void WGEViewerEffect::setEnabled ( bool  enable = true)
virtual

Set the effect enabled.

Parameters
enabletrue to enable. False to disable.

Definition at line 86 of file WGEViewerEffect.cpp.

References m_active.

void WGEViewerEffect::setEnabledByDefault ( bool  enableByDefault = true)
virtual

Use this to activate an effect by default.

This sets the default value of the active property. It can be overwritten by user settings.

Parameters
enableByDefaultactivate this effect by default if true.

Definition at line 91 of file WGEViewerEffect.cpp.

References m_active.

Member Data Documentation

WPropBool WGEViewerEffect::m_active
protected

Enable or disable effect.

Definition at line 103 of file WGEViewerEffect.h.

Referenced by isEnabled(), setEnabled(), setEnabledByDefault(), and WGEViewerEffect().

osg::ref_ptr< osg::Geode > WGEViewerEffect::m_geode
protected
osg::ref_ptr< osg::StateSet > WGEViewerEffect::m_state
protected

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