VR-Forces 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
makVrv::DtLaserDazzle Class Reference

PostProcessor effect for creating a dazzling effect on screen a laser points at the observer.

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

Public Member Functions

 DtLaserDazzle (DtDe &de, const std::string &postProcessType, bool handles2D)
 
virtual ~DtLaserDazzle ()
 
 DtLaserDazzle ()=delete
 
 DtLaserDazzle (const DtLaserDazzle &)=delete
 
DtLaserDazzle & operator= (const DtLaserDazzle &)=delete
 
virtual bool update (DtChannel *channel)
 
- 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 void setInputTexture (const DtChannel *channel, osg::Texture *texture)
 
virtual osg::Texture * outputTexture ()
 
virtual void setIsFinalEffect (const DtChannel *channel, bool final)
 
virtual osg::Camera * cameraForChannel (const DtChannel *channel)
 
virtual void slot_releaseResources ()
 
virtual void releaseGLObjects ()
 
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 postProcessorEnabled ()
 
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

virtual void getCameraFovAspect (const osg::Camera *cam, double &fovyRad, double &aspect) const
 
virtual bool getNormalisedViewportPositionFromWorld (const osg::Vec3d &world, const osg::Camera *cam, osg::Vec2 &out) const
 
virtual DazzleHit computeDazzleOnFixedPlane (const osg::Camera *cam, const osg::Vec3d &laserOrigin, const osg::Vec3d &laserDirN, double width, double dist) const
 
- Protected Member Functions inherited from makVrv::DtPostProcessor
virtual bool effectItrEnabled (const EffectMap::iterator &effect) const
 
virtual void initialize ()
 
virtual void addEffect (std::string effect)
 
virtual void setEnablePostProcessor (bool enabled)
 

Protected Attributes

osg::ref_ptr
< DtLaserDazzleDrawable > 
myDrawable
 
- 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
 
DtDe & myDe
 
DtSignalConnectionManager mySignals
 

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::DtLaserDazzle::DtLaserDazzle ( DtDe &  de,
const std::string &  postProcessType,
bool  handles2D 
)

Constructor.

virtual makVrv::DtLaserDazzle::~DtLaserDazzle ( )
virtual

Destructor.

makVrv::DtLaserDazzle::DtLaserDazzle ( )
delete

private default constructor. not allowed.

makVrv::DtLaserDazzle::DtLaserDazzle ( const DtLaserDazzle &  )
delete

prevent copy-construction

Member Function Documentation

DtLaserDazzle& makVrv::DtLaserDazzle::operator= ( const DtLaserDazzle &  )
delete

prevent assignment

virtual bool makVrv::DtLaserDazzle::update ( DtChannel *  channel)
virtual

Called once per frame from the DtPostProcessManager.

Implements makVrv::DtPostProcessor.

virtual void makVrv::DtLaserDazzle::getCameraFovAspect ( const osg::Camera *  cam,
double &  fovyRad,
double &  aspect 
) const
protectedvirtual

return the cmaras field of view (radians) and the view aspect ratio using getProjectionMatrixAsPerspective. If getProjectionMatrixAsPerspective fails then fallback to a default of 60 degrees and get aspect ratio from viewport.

virtual bool makVrv::DtLaserDazzle::getNormalisedViewportPositionFromWorld ( const osg::Vec3d &  world,
const osg::Camera *  cam,
osg::Vec2 &  out 
) const
protectedvirtual

returns the world space position in the cameras normalized viewport space.

virtual DazzleHit makVrv::DtLaserDazzle::computeDazzleOnFixedPlane ( const osg::Camera *  cam,
const osg::Vec3d &  laserOrigin,
const osg::Vec3d &  laserDirN,
double  width,
double  dist 
) const
protectedvirtual

computes an intersection of a line with a plane placed infront of the camera at dist with dimensions width x (view aspect * width)

Member Data Documentation

osg::ref_ptr<DtLaserDazzleDrawable> makVrv::DtLaserDazzle::myDrawable
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)