VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWeatherLayerGroup.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 <vrvOsg/vrvOsg.h>
13 
14 #include <osg/Group>
15 
17 #include <vrvOsg/DtWeatherEffect.h>
18 #include <vrvOsg/DtWeatherLayer.h>
19 
22 
23 
24 
25 namespace makVrv
26 {
27  // Forward declarations.
28  class DtJobSplitter;
29 
30 
47  class DT_DLL_VRVOSG DtWeatherLayerGroup : public osg::Group
48  {
49  public:
50 
53 
55  DtWeatherLayerGroup(const DtWeatherLayerGroup& orig, const osg::CopyOp& opr);
56 
58  virtual ~DtWeatherLayerGroup();
59 
60  private:
61 
64 
66  DtWeatherLayerGroup &operator=(const DtWeatherLayerGroup &other);
67 
68  public:
69 
71  virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DtWeatherLayerGroup(*this, copyop); }
72  virtual osg::Object* cloneType() const { return NULL; }
73 
75  virtual void releaseWeatherEffectGLObjects(osg::State* state) const;
76 
78  virtual void deleteGeode();
79 
80  // !\brief Gets the sensor node suitable for use with sensorFX.
81  virtual osg::Node* getOrCreateSensorNode();
82 
85  virtual void removeLayer(DtUniqueID layerId);
86 
88  virtual void removeAllLayers();
89 
93  virtual void addLayer(DtWeatherLayer* layer);
94 
97  virtual DtWeatherLayer* getLayer(DtUniqueID layerId);
98 
102  virtual void setWind(float windDirectionRad, float windSpeedMps);
103 
107  virtual void setLayerIntensity(DtUniqueID layerId, float level);
108 
110  virtual void drawWeatherEffects(DtWeatherEffect::DrawData& drawData);
111 
113  virtual float timeStep() const;
114 
115  protected:
116 
118  void connectSignals();
119 
121  void disconnectSignals();
122 
124  virtual void slot_simulationUpdate();
125 
127  virtual void traverse(osg::NodeVisitor& nv);
128 
131  virtual void cullUpdate(osg::Camera* cam);
132 
136  virtual void computeBasis(const osg::Vec3d& inGeocentricPos, osg::Matrixd& rotOut);
137 
138  protected:
139 
141 
144 
145  std::vector<osg::Vec4d> myCullingPlanes;
146 
147  double myLastTime;
148  float myTimeStep;
151 
153 
154  private:
155 
157 
159  typedef std::map<DtUniqueID, DtWeatherLayer*> WeatherLayerMap;
160 
162  };
163 
164 
165 
168  {
169 
170  public:
171 
173  static DtWeatherLayerGroupCreator& instance(DtDe& theIG);
174 
176  static void registerInstance(DtDe& theIG, DtWeatherLayerGroupCreator* anInstance);
177 
179  virtual DtWeatherLayerGroup* create(DtDe&);
180  };
181 }
182 
183 
osg::ref_ptr< makVrv::DtWeatherEffectDrawable > myEffectDrawable
Definition: DtWeatherLayerGroup.h:143
std::vector< osg::Vec4d > myCullingPlanes
Definition: DtWeatherLayerGroup.h:145
float myWindDirectionRad
Definition: DtWeatherLayerGroup.h:149
Contains makVrv::DtWeatherLayer class.
Virtual base class.
Definition: DtVirtualBaseClass.h:22
DtDe & myDe
Definition: DtWeatherLayerGroup.h:140
WeatherLayerMap myMutableWeatherLayerMap
Definition: DtWeatherLayerGroup.h:161
A group node which serves as a root for weather layers.
Definition: DtWeatherLayerGroup.h:47
Creator that is used to create the weather layer group.
Definition: DtWeatherLayerGroup.h:167
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
virtual osg::Object * clone(const osg::CopyOp &copyop) const
required functions for derriving from osg::Group
Definition: DtWeatherLayerGroup.h:71
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
DtJobSplitter * myJobSplitter
Definition: DtWeatherLayerGroup.h:152
float myWindSpeedMps
Definition: DtWeatherLayerGroup.h:150
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
double myLastTime
Definition: DtWeatherLayerGroup.h:147
float myTimeStep
Definition: DtWeatherLayerGroup.h:148
A structure used to hold data for drawing.
Definition: DtWeatherEffect.h:45
Contains makVrv::DtVirtualBaseClass class.
Contains makVrv::DtWeatherEffect class.
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
osg::ref_ptr< osg::Geode > myEffectGeode
Definition: DtWeatherLayerGroup.h:142
Base class to provide boost signal/slot management.
A weather layer uses one or more weather effects to create a top level visual.
Definition: DtWeatherLayer.h:39
virtual osg::Object * cloneType() const
Definition: DtWeatherLayerGroup.h:72
std::map< DtUniqueID, DtWeatherLayer * > WeatherLayerMap
These are mutable because it&#39;s used as part of the const drawImplementation.
Definition: DtWeatherLayerGroup.h:159
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains the makVrv::DtOsgCullVisitorParameters class.

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)