VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtHdrPostProcessor Class Reference

post processor class that handles HDR post processing effects

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

Public Member Functions

 DtHdrPostProcessor (DtDe &de)
 
virtual ~DtHdrPostProcessor ()
 
virtual void slot_reloadShaders ()
 
virtual bool update (DtChannel *channel)
 
virtual void setInputTexture (const DtChannel *channel, osg::Texture *texture) override
 
virtual osg::ref_ptr
< osg::Texture > 
inputTexture ()
 
virtual bool postProcessorEnabled () const
 
virtual void releaseGLObjects () override
 
slots for handling when HDR settings change
virtual void slot_enableHdrAutoExposureChanged (bool val)
 
virtual void slot_enableHdrExposureCorrelationChanged (bool val)
 
virtual void slot_enableHdrBloomChanged (bool val)
 
virtual void slot_enableHdrStreaksChanged (bool val)
 
virtual void slot_enableHdrLensFlareChanged (double val)
 
virtual void slot_autoExposureRateScaleChanged (double val)
 
virtual void slot_autoExposurePreScaleChanged (double val)
 
virtual void slot_autoExposureMinDiffChanged (double val)
 
virtual void slot_autoExposureMaxDiffChanged (double val)
 
virtual void slot_autoExposureClampMinChanged (double val)
 
virtual void slot_autoExposureClampMaxChanged (double val)
 
virtual void slot_autoExposurePostScaleChanged (double val)
 
virtual void slot_bloomScaleChanged (double val)
 
virtual void slot_streakIntensityScaleChanged (double val)
 
virtual void slot_numStreaksChanged (int val)
 
virtual void slot_streaksLenScaleChanged (double val)
 
virtual void slot_streakRotationOffsetChanged (double val)
 
virtual void slot_lensFlareScaleChanged (double val)
 
virtual void slot_gammaChanged (double val)
 
virtual void slot_hdrResolutionScaleChanged (int val)
 
- Public Member Functions inherited from makVrv::DtPostProcessor
 DtPostProcessor (DtDe &de, const std::string &postProcessType, bool handles2D)
 
virtual ~DtPostProcessor ()
 
virtual void setFragmentShaderSource (const char *source)
 
virtual void setVertexShaderSource (const char *source)
 
virtual void setFragmentShaderFile (const std::string &fileName)
 
virtual void setVertexShaderFile (const std::string &fileName)
 
virtual osg::Texture * outputTexture ()
 
virtual void setIsFinalEffect (const DtChannel *channel, bool final)
 
virtual osg::Camera * cameraForChannel (const DtChannel *channel)
 
virtual void slot_releaseResources ()
 
virtual bool hasEffect (const std::string &effect)
 
virtual bool effectEnabled (const std::string &effect)
 
virtual bool anyEffectEnabled ()
 
virtual std::list< std::string > supportedEffects ()
 
virtual bool handles2D () const
 
virtual const std::string & type () const
 
virtual bool needsOcclusionTexture () const
 
virtual bool enableEffect (const std::string &effect)
 
virtual bool disableEffect (const std::string &effect)
 
virtual void enablePostProcessor ()
 
virtual void disablePostProcessor ()
 

Protected Member Functions

int calcHdrRes (int width, int height, int scale)
 
virtual bool effectItrEnabled (EffectMap::iterator &effect)
 
json helper functions for getting different types from the json object
virtual void getJsonValue (const rapidjson::Document &doc, const std::string &name, std::string &value)
 
virtual void getJsonValue (const rapidjson::Document &doc, const std::string &name, float &value)
 
virtual void getJsonValue (const rapidjson::Document &doc, const std::string &name, int &value)
 
virtual void getJsonValue (const rapidjson::Document &doc, const std::string &name, bool &value)
 
virtual void getJsonValue (const rapidjson::Document &doc, const std::string &name, osg::Vec4 &value)
 
virtual void getHdrOptions (int width, int height, DtHdrDrawable::DtHdrOptions &options)
 
- Protected Member Functions inherited from makVrv::DtPostProcessor
virtual bool effectItrEnabled (const EffectMap::iterator &effect)
 
virtual void initialize ()
 
virtual void addEffect (std::string effect)
 
virtual void setEnablePostProcessor (bool enabled)
 

Protected Attributes

int myViewX
 
int myViewY
 
int myViewWidth
 
int myViewHeight
 
osg::ref_ptr< DtHdrDrawablemyHdrDrawable
 
osg::ref_ptr< osg::Texture > myLensFlareTexture
 
DtSignalConnectionManager myConnections
 
- Protected Attributes inherited from makVrv::DtPostProcessor
osg::ref_ptr< osg::Texture > myOutputTexture
 
osg::ref_ptr< osg::Texture > 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
 
CameraMap myCameraMap
 
bool myHandles2DFlag
 
bool myEnabledFlag
 
std::string myType
 
EffectMap myEffects
 
CallbackMap myCullCallbackMap
 
DtDemyDe
 
DtSignalConnectionManager mySignals
 

Private Member Functions

 DtHdrPostProcessor ()
 
 DtHdrPostProcessor (const DtHdrPostProcessor &)
 
DtHdrPostProcessoroperator= (const DtHdrPostProcessor &)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

makVrv::DtHdrPostProcessor::DtHdrPostProcessor ( DtDe de)

constructor which sets up the myDe object

virtual makVrv::DtHdrPostProcessor::~DtHdrPostProcessor ( )
virtual

destructor

makVrv::DtHdrPostProcessor::DtHdrPostProcessor ( )
private

private default constructor. not allowed.

makVrv::DtHdrPostProcessor::DtHdrPostProcessor ( const DtHdrPostProcessor )
private

prevent copy-construction

Member Function Documentation

DtHdrPostProcessor& makVrv::DtHdrPostProcessor::operator= ( const DtHdrPostProcessor )
private

prevent assignment

virtual void makVrv::DtHdrPostProcessor::slot_reloadShaders ( )
virtual

slot for handling when the shaders are reloaded which recreates the Drawable

virtual void makVrv::DtHdrPostProcessor::slot_enableHdrAutoExposureChanged ( bool  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_enableHdrExposureCorrelationChanged ( bool  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_enableHdrBloomChanged ( bool  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_enableHdrStreaksChanged ( bool  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_enableHdrLensFlareChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_autoExposureRateScaleChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_autoExposurePreScaleChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_autoExposureMinDiffChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_autoExposureMaxDiffChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_autoExposureClampMinChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_autoExposureClampMaxChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_autoExposurePostScaleChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_bloomScaleChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_streakIntensityScaleChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_numStreaksChanged ( int  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_streaksLenScaleChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_streakRotationOffsetChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_lensFlareScaleChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_gammaChanged ( double  val)
virtual
virtual void makVrv::DtHdrPostProcessor::slot_hdrResolutionScaleChanged ( int  val)
virtual
virtual bool makVrv::DtHdrPostProcessor::update ( DtChannel channel)
virtual

update function which makes sure the drawable is created and enabled when appropriate.

Implements makVrv::DtPostProcessor.

virtual void makVrv::DtHdrPostProcessor::setInputTexture ( const DtChannel channel,
osg::Texture *  texture 
)
overridevirtual

overrides the base class call so the input texture can be passed to the drawable.

Reimplemented from makVrv::DtPostProcessor.

virtual osg::ref_ptr< osg::Texture > makVrv::DtHdrPostProcessor::inputTexture ( )
virtual

getter for the input texture

virtual bool makVrv::DtHdrPostProcessor::postProcessorEnabled ( ) const
virtual

override the base function with the shared state enableHdr

Reimplemented from makVrv::DtPostProcessor.

virtual void makVrv::DtHdrPostProcessor::releaseGLObjects ( )
overridevirtual

cleanup any graphics related stuff when the last window is removed since the graphics context will soon be destroyed.

Reimplemented from makVrv::DtPostProcessor.

int makVrv::DtHdrPostProcessor::calcHdrRes ( int  width,
int  height,
int  scale 
)
protected

helper function for calculating the HDR texture resolution to use width and height are the channel width and height scale is how much to bit shift the resolution in what direction so -1 divides by 2 and 1 multiplies by 2 and 0 uses the default calculated value.

virtual bool makVrv::DtHdrPostProcessor::effectItrEnabled ( EffectMap::iterator &  effect)
protectedvirtual
virtual void makVrv::DtHdrPostProcessor::getJsonValue ( const rapidjson::Document &  doc,
const std::string &  name,
std::string &  value 
)
protectedvirtual
virtual void makVrv::DtHdrPostProcessor::getJsonValue ( const rapidjson::Document &  doc,
const std::string &  name,
float &  value 
)
protectedvirtual
virtual void makVrv::DtHdrPostProcessor::getJsonValue ( const rapidjson::Document &  doc,
const std::string &  name,
int value 
)
protectedvirtual
virtual void makVrv::DtHdrPostProcessor::getJsonValue ( const rapidjson::Document &  doc,
const std::string &  name,
bool value 
)
protectedvirtual
virtual void makVrv::DtHdrPostProcessor::getJsonValue ( const rapidjson::Document &  doc,
const std::string &  name,
osg::Vec4 &  value 
)
protectedvirtual
virtual void makVrv::DtHdrPostProcessor::getHdrOptions ( int  width,
int  height,
DtHdrDrawable::DtHdrOptions options 
)
protectedvirtual

Member Data Documentation

int makVrv::DtHdrPostProcessor::myViewX
protected
int makVrv::DtHdrPostProcessor::myViewY
protected
int makVrv::DtHdrPostProcessor::myViewWidth
protected
int makVrv::DtHdrPostProcessor::myViewHeight
protected
osg::ref_ptr<DtHdrDrawable> makVrv::DtHdrPostProcessor::myHdrDrawable
protected
osg::ref_ptr<osg::Texture> makVrv::DtHdrPostProcessor::myLensFlareTexture
protected
DtSignalConnectionManager makVrv::DtHdrPostProcessor::myConnections
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)