VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGroundFogEffectDrawable.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/Camera>
13 #include <osg/Drawable>
14 
15 #include <vrvCore/DtDe.h>
16 
19 #include <vrvOsg/vrvOsg.h>
20 
22 
23 
24 namespace makVrv
25 {
26  // Forward declarations.
27  class DtGroundFogGroup;
28 
29 
35  class DT_DLL_VRVOSG DtGroundFogEffectDrawable : public osg::Drawable
36  {
37  public:
38 
41 
43  DtGroundFogEffectDrawable(const DtGroundFogEffectDrawable& orig, const osg::CopyOp& opr);
44 
46  virtual ~DtGroundFogEffectDrawable();
47 
48  private:
49 
52 
55 
58 
59  public:
60 
62  virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DtGroundFogEffectDrawable(*this, copyop); }
63  virtual osg::Object* cloneType() const { return NULL; }
64 
66  virtual bool init();
67 
69  virtual void releaseGLObjects(osg::State* state) const;
70 
72  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
73 
75  virtual void applyState(DtGroundFogEffect::DrawData& drawData) const;
76 
80  virtual void setWind(float windDirectionRad, float windSpeedMps);
81 
82  protected:
83 
85  virtual bool loadShaders();
86 
88  virtual void connectSignals();
89 
91  virtual void disconnectSignals();
92 
94  virtual void slot_reloadShaders();
95 
98  virtual void setupSoftness(osg::Camera* camera) const;
99 
100  protected:
101 
104 
106 
109 
112 
113  private:
114 
122 
123  // ground fog specific
126  };
127 
128 
131  {
132  public:
135 
138 
139  private:
144 
145  public:
147  virtual DtGroundFogEffectDrawable* create(DtGroundFogGroup* groundFogGroup) const;
148 
151  static DtGroundFogEffectDrawableCreator& instance(DtDe& de);
152 
154  static const std::string& theClassName();
155 
156  protected:
158  };
159 }
160 
161 
162 
Virtual base class.
Definition: DtVirtualBaseClass.h:22
virtual osg::Object * cloneType() const
Definition: DtGroundFogEffectDrawable.h:63
A structure used to hold data for drawing.
Definition: DtGroundFogEffect.h:40
float myWindDirectionRad
Definition: DtGroundFogEffectDrawable.h:107
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
virtual osg::Object * clone(const osg::CopyOp &copyop) const
required functions for derriving from osg::Drawable
Definition: DtGroundFogEffectDrawable.h:62
osg::ref_ptr< osg::Uniform > myMutableIsReflectionUniform
Definition: DtGroundFogEffectDrawable.h:120
Contains makVrv::DtDe class.
creator for DtGroundFogEffectDrawable
Definition: DtGroundFogEffectDrawable.h:130
osg::ref_ptr< osg::Uniform > myMutableInvPersMatrixUniform
needed for smoothness These are mutable because they are used as part of the const drawImplementation...
Definition: DtGroundFogEffectDrawable.h:117
osg::ref_ptr< osg::Uniform > myMutablePersMatrixUniform
Definition: DtGroundFogEffectDrawable.h:118
Contains makVrv::DtOsgCullVisitor class.
osg::ref_ptr< osg::Texture > myParticleTexture
Definition: DtGroundFogEffectDrawable.h:110
Contains makVrv::DtVirtualBaseClass class.
osg::ref_ptr< osg::Uniform > myMutableViewportUniform
Definition: DtGroundFogEffectDrawable.h:119
osg::ref_ptr< osg::Uniform > myMutableSoftnessUniform
Definition: DtGroundFogEffectDrawable.h:121
A group node which serves as a root for patchy ground fog areas, and effects in addition to infinite ...
Definition: DtGroundFogGroup.h:47
float myWindSpeedMps
Definition: DtGroundFogEffectDrawable.h:108
DtDe & myDe
Definition: DtGroundFogEffectDrawable.h:157
osg::ref_ptr< osg::StateSet > myStateSet
Definition: DtGroundFogEffectDrawable.h:111
osg::ref_ptr< osg::Uniform > myMutableViewMatrixInvUniform
This is mutable because it&#39;s used as part of the const drawImplementation.
Definition: DtGroundFogEffectDrawable.h:125
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Contains makVrv::DtGroundFogEffect class.
Contains DLL export macros.
A drawable for drawing ground fog effects.
Definition: DtGroundFogEffectDrawable.h:35
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtGroundFogGroup * myGroundFogGroup
Definition: DtGroundFogEffectDrawable.h:103
DtDe & myDe
Definition: DtGroundFogEffectDrawable.h:102
bool myInitialized
Definition: DtGroundFogEffectDrawable.h:105

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)