VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLaserDazzle.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2025 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
6 #pragma once
7 
11 
15 
16 namespace makVrv
17 {
18 
19  class DtWindow;
20 
21  struct DazzleHit
22  {
23  osg::Vec2 uv; // 0..1
24  osg::Vec2 beamDir; // normalized
25  bool valid = false;
26  };
27 
32  {
33  public:
35  DtLaserDazzle(DtDe& de, const std::string& postProcessType, bool handles2D);
36 
38  virtual ~DtLaserDazzle();
39 
41  DtLaserDazzle() = delete;
42 
44  DtLaserDazzle(const DtLaserDazzle&) = delete;
45 
47  DtLaserDazzle& operator=(const DtLaserDazzle&) = delete;
48 
49  public:
51  virtual bool update(DtChannel *channel);
52 
53  protected:
54 
58  virtual void getCameraFovAspect(const osg::Camera* cam, double& fovyRad, double& aspect) const;
59 
61  virtual bool getNormalisedViewportPositionFromWorld(const osg::Vec3d& world,
62  const osg::Camera* cam,
63  osg::Vec2& out) const;
64 
67  virtual DazzleHit computeDazzleOnFixedPlane(const osg::Camera* cam,
68  const osg::Vec3d& laserOrigin,
69  const osg::Vec3d& laserDirN,
70  double width,
71  double dist) const;
72 
73  protected:
74 
76  };
77 
78  //
79  // Creator
80  //
81 
86  : public DtPostProcessorCreator
87  {
88  public:
90  friend class DtPostProcessManager;
91 
94 
96  virtual ~DtLaserDazzleCreator();
97 
98  protected:
100  virtual DtPostProcessor* create(DtDe& de, const std::string& postProcessType);
101  };
102 
103 }
osg::ref_ptr< DtLaserDazzleDrawable > myDrawable
Definition: DtLaserDazzle.h:75
PostProcessor effect for creating a dazzling effect on screen a laser points at the observer...
Definition: DtLaserDazzle.h:31
osg::Vec2 beamDir
Definition: DtLaserDazzle.h:24
A DtLaserDazzleCreator instance is registered with the post process element factory to create DtPostP...
Definition: DtLaserDazzle.h:85
Definition: featureContext.h:36
DtPostProcessorCreator is the common base class for all post processor creators.
Definition: DtPostProcessor.h:234
Contains makVrv::DtLaserDazzleDrawable class.
osg::Vec2 uv
Definition: DtLaserDazzle.h:23
The abstract Channel Class.
Definition: DtChannel.h:35
This class provides the OSG-specific management of post-processing effects.
Definition: DtPostProcessManager.h:27
#define DT_DLL_VRVPOSTPROCESSOR
Definition: vrvPostProcessor.h:19
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Definition: DtLaserDazzle.h:21
This class provides the OSG-specific implementation of a post processor. A post processor has a type ...
Definition: DtPostProcessor.h:66
bool valid
Definition: DtLaserDazzle.h:25

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)