VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtDepthOfField Class Reference

This class provides an OSG-specific implementation of camera depth of field. More...

Inheritance diagram for makVrv::DtDepthOfField:
Inheritance graph
[legend]

Public Member Functions

 DtDepthOfField (DtDe &de, const std::string &postProcessType, bool handles2D)
 Constructor.
virtual ~DtDepthOfField ()
 Destructor.
void setFocalRange (float range)
 Sets the focal range.
void setFocalDepth (float depth)
 Sets the focal depth (focal distance)
void setAutofocus (bool useAutofocus)
 Enable or disable autofocus.
virtual void update (DtChannel *channel)
 Called once per frame from the DtOsgPostProcessManager.
- Public Member Functions inherited from makVrv::DtPostProcessor
 DtPostProcessor (const std::string &postProcessType, bool handles2D)
 CTOR.
virtual ~DtPostProcessor ()
 DTOR.
void setFragmentShaderSource (const char *source)
 Sets fragment shader source for this post-processor.
void setVertexShaderSource (const char *source)
 Sets vertex shader source for this post-processor.
void setFragmentShaderFile (const std::string &fileName)
 Sets fragment shader file for this post-processor.
void setVertexShaderFile (const std::string &fileName)
 Sets vertex shader file for this post-processor.
void setInputTexture (const DtChannel *channel, osg::Texture2D *texture)
 Sets the image that is postprocessed; this may be the 3D scene rendered to a texture, or the output texture of a chained post processor.
osg::Texture2D * outputTexture ()
 Gets the output texture of this post processor, for use in chaining processors together.
void setIsFinalEffect (const DtChannel *channel, bool final)
 Called by the DtOsgPostProcessManager to indicate if this is the last post processor in the chain, and should render to the framebuffer.
osg::Camera * cameraForChannel (const DtChannel *channel)
 Gets the Camera node associated with this effect and channel.
virtual void releaseGLObjects ()
bool hasEffect (std::string effect)
 Does this post processor support this effect?
bool effectEnabled (std::string effect)
 Is this effect (post processor sub-component) enabled?
bool anyEffectEnabled ()
 Are any effects enabled?
std::list< std::string > supportedEffects ()
 Get a list of supported effects for this post processor.
bool handles2D () const
 Retrieves whether this post processor should be used in 2D orthographic views, as specified in its constructor.
const std::string & type () const
 Gets the type of the post processor.
bool postProcessorEnabled () const
 Is this post processor enabled?
virtual bool enableEffect (std::string effect)
 Enable a particular post processing technique For example, "wateroncamera" has techniques "rainsplash", "oceanspray", and "wavesplash".
virtual bool disableEffect (std::string effect)
 Enable a particular post processing technique For example, "wateroncamera" has techniques "rainsplash", "oceanspray", and "wavesplash".
virtual void enablePostProcessor ()
 Enable or disable the post processor.
virtual void disablePostProcessor ()
 Enable or disable the post processor.

Protected Member Functions

void initialize ()
void slot_windowRemoved (DtWindow *window)
- Protected Member Functions inherited from makVrv::DtPostProcessor
void addEffect (std::string effect)
 When constructing a post processor, add the names of the sub-components (effects) that can be enabled and disabled.
void setEnablePostProcessor (bool enabled)
 Set the post processor enabled state (true = enabled)

Protected Attributes

DtDemyDe
float myFocalRange
float myFocalDepth
bool myUseAutofocus
- Protected Attributes inherited from makVrv::DtPostProcessor
osg::ref_ptr< osg::Texture2D > myOutputTexture
osg::ref_ptr< osg::Texture2D > myInputTexture
osg::ref_ptr< osg::Program > myProgram
osg::ref_ptr< osg::Shader > myFragmentShader
osg::ref_ptr< osg::Shader > myVertexShader
osg::ref_ptr< osg::Geode > myQuad
charmyCustomFragmentSource
CameraMap myCameraMap
bool myHandles2DFlag
bool myEnabledFlag
std::string myType
EffectMap myEffects

Additional Inherited Members

- Protected Types inherited from makVrv::DtPostProcessor
typedef std::map< const
DtChannel *, osg::ref_ptr
< osg::Camera > > 
CameraMap
typedef boost::unordered_map
< std::string, bool
EffectMap

Detailed Description

This class provides an OSG-specific implementation of camera depth of field.

Constructor & Destructor Documentation

makVrv::DtDepthOfField::DtDepthOfField ( DtDe de,
const std::string &  postProcessType,
bool  handles2D 
)

Constructor.

virtual makVrv::DtDepthOfField::~DtDepthOfField ( )
virtual

Destructor.

Member Function Documentation

void makVrv::DtDepthOfField::setFocalRange ( float  range)

Sets the focal range.

void makVrv::DtDepthOfField::setFocalDepth ( float  depth)

Sets the focal depth (focal distance)

void makVrv::DtDepthOfField::setAutofocus ( bool  useAutofocus)

Enable or disable autofocus.

virtual void makVrv::DtDepthOfField::update ( DtChannel channel)
virtual

Called once per frame from the DtOsgPostProcessManager.

Implements makVrv::DtPostProcessor.

void makVrv::DtDepthOfField::initialize ( )
protected

Reimplemented from makVrv::DtPostProcessor.

void makVrv::DtDepthOfField::slot_windowRemoved ( DtWindow window)
protected

Member Data Documentation

DtDe& makVrv::DtDepthOfField::myDe
protected
float makVrv::DtDepthOfField::myFocalRange
protected
float makVrv::DtDepthOfField::myFocalDepth
protected
bool makVrv::DtDepthOfField::myUseAutofocus
protected

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)