OpenWalnut
1.4.0
|
Base class for implementing basic fullscreen effects for the WGEViewer. More...
#include <WGEViewerEffect.h>
Public Types | |
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 Member Functions | |
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. | |
Protected Attributes | |
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. |
Base class for implementing basic fullscreen effects for the WGEViewer.
It uses properties for configuration.
Definition at line 42 of file WGEViewerEffect.h.
typedef osg::ref_ptr< const WGEViewerEffect > WGEViewerEffect::ConstSPtr |
Convenience typedef for a boost::shared_ptr< const WGEViewerEffect >.
Reimplemented from WObjectNDIP< WGECamera >.
Reimplemented in WGEViewerEffectImageOverlay, WGEViewerEffectHorizon, and WGEViewerEffectVignette.
Definition at line 53 of file WGEViewerEffect.h.
typedef osg::ref_ptr< WGEViewerEffect > WGEViewerEffect::SPtr |
Convenience typedef for a boost::shared_ptr< WGEViewerEffect >.
Reimplemented from WObjectNDIP< WGECamera >.
Reimplemented in WGEViewerEffectImageOverlay, WGEViewerEffectHorizon, and WGEViewerEffectVignette.
Definition at line 48 of file WGEViewerEffect.h.
WGEViewerEffect::WGEViewerEffect | ( | std::string | name, |
std::string | description, | ||
const char ** | icon = NULL |
||
) |
Create the effect.
name | the name |
description | the description |
icon | an 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.
bool WGEViewerEffect::isEnabled | ( | ) | const [virtual] |
Check whether the effect is active or not.
Definition at line 81 of file WGEViewerEffect.cpp.
References m_active.
void WGEViewerEffect::setEnabled | ( | bool | enable = true | ) | [virtual] |
Set the effect enabled.
enable | true 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.
enableByDefault | activate this effect by default if true. |
Definition at line 91 of file WGEViewerEffect.cpp.
References m_active.
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] |
The fullscreen quad.
Definition at line 93 of file WGEViewerEffect.h.
Referenced by WGEViewerEffect(), WGEViewerEffectHorizon::WGEViewerEffectHorizon(), WGEViewerEffectImageOverlay::WGEViewerEffectImageOverlay(), and WGEViewerEffectVignette::WGEViewerEffectVignette().
osg::ref_ptr< osg::StateSet > WGEViewerEffect::m_state [protected] |
The stateset of the cam.
Definition at line 98 of file WGEViewerEffect.h.
Referenced by WGEViewerEffect(), WGEViewerEffectHorizon::WGEViewerEffectHorizon(), WGEViewerEffectImageOverlay::WGEViewerEffectImageOverlay(), and WGEViewerEffectVignette::WGEViewerEffectVignette().