VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGroundFogPatchDrawable.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 DtGroundFogPatchDrawable : public osg::Drawable
36  {
37  public:
38 
41 
43  DtGroundFogPatchDrawable(const DtGroundFogPatchDrawable& orig, const osg::CopyOp& opr);
44 
46  virtual ~DtGroundFogPatchDrawable();
47 
48  private:
49 
52 
55 
57  DtGroundFogPatchDrawable &operator=(const DtGroundFogPatchDrawable &other);
58 
59  public:
60 
62  virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DtGroundFogPatchDrawable(*this, copyop); }
63  virtual osg::Object* cloneType() const { return NULL; }
64 
66  virtual void init();
67 
69  virtual void releaseGLObjects(osg::State* state) const;
70 
72  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
73 
75  virtual void applyState(DtGroundFogPatchArea::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 
113 
114  private:
115 
123 
124  // ground fog specific
127  };
128 
129 
132  {
133  public:
136 
139 
140  private:
145 
146  public:
148  virtual DtGroundFogPatchDrawable* create(DtGroundFogGroup* groundFogGroup) const;
149 
152  static DtGroundFogPatchDrawableCreator& instance(DtDe& de);
153 
155  static const std::string& theClassName();
156 
157  protected:
159  };
160 }
161 
162 
163 
osg::ref_ptr< osg::Uniform > myMutablePersMatrixUniform
Definition: DtGroundFogPatchDrawable.h:119
Virtual base class.
Definition: DtVirtualBaseClass.h:22
osg::ref_ptr< osg::Texture > myParticleTexture
Definition: DtGroundFogPatchDrawable.h:110
float myWindDirectionRad
Definition: DtGroundFogPatchDrawable.h:107
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtGroundFogPatchArea class.
osg::ref_ptr< osg::Texture > myPatternTexture
Definition: DtGroundFogPatchDrawable.h:111
osg::ref_ptr< osg::StateSet > myStateSet
Definition: DtGroundFogPatchDrawable.h:112
Contains makVrv::DtDe class.
osg::ref_ptr< osg::Uniform > myMutableInvPersMatrixUniform
needed for smoothness These are mutable because they are used as part of the const drawImplementation...
Definition: DtGroundFogPatchDrawable.h:118
osg::ref_ptr< osg::Uniform > myMutableViewportUniform
Definition: DtGroundFogPatchDrawable.h:120
osg::ref_ptr< osg::Uniform > myMutableSoftnessUniform
Definition: DtGroundFogPatchDrawable.h:122
virtual osg::Object * clone(const osg::CopyOp &copyop) const
required functions for derriving from osg::Drawable
Definition: DtGroundFogPatchDrawable.h:62
Contains makVrv::DtOsgCullVisitor class.
Contains makVrv::DtVirtualBaseClass class.
virtual osg::Object * cloneType() const
Definition: DtGroundFogPatchDrawable.h:63
DtDe & myDe
Definition: DtGroundFogPatchDrawable.h:102
bool myInitialized
Definition: DtGroundFogPatchDrawable.h:105
A group node which serves as a root for patchy ground fog areas, and effects in addition to infinite ...
Definition: DtGroundFogGroup.h:47
DtGroundFogGroup * myGroundFogGroup
Definition: DtGroundFogPatchDrawable.h:103
DtDe & myDe
Definition: DtGroundFogPatchDrawable.h:158
osg::ref_ptr< osg::Uniform > myMutableIsReflectionUniform
Definition: DtGroundFogPatchDrawable.h:121
float myWindSpeedMps
Definition: DtGroundFogPatchDrawable.h:108
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
creator for DtGroundFogPatchDrawable
Definition: DtGroundFogPatchDrawable.h:131
A drawable used for drawing patchy ground fog objects.
Definition: DtGroundFogPatchDrawable.h:35
A structure used to hold data for drawing.
Definition: DtGroundFogPatchArea.h:69
osg::ref_ptr< osg::Uniform > myMutableViewMatrixInvUniform
This is mutable because it&#39;s used as part of the const drawImplementation.
Definition: DtGroundFogPatchDrawable.h:126

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)