VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
localWeatherManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
7 
8 #pragma once
9 
10 #include <vrfGuiCore/vrfGuiCore.h>
15 #include <vrvUtil/DtUnicode.h>
16 #include <vrvCore/DtStateView.h>
17 #include <vrvUtil/signalslib.h>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtSimObjectEntry;
27  struct DtVrlinkSimulatedBaseState;
28 }
29 
30 namespace makVrf
31 {
32  struct DtVrlinkSimulatedEnvironmentProcess;
33  class DtWeatherLookModificationOperation;
34  class DtLocalWeatherLookOperationManager;
35 
37  {
38  public:
39  typedef std::map<makVrv::DtElementID, makVrv::DtStateView<DtVrlinkSimulatedEnvironmentProcess>*> WeatherObjects;
40 
42  {
45  };
46 
47  typedef std::map<makVrv::DtUniqueID, GlobalScenarioCreationData> GlobalWeatherObjects;
48 
49  public:
52 
54  virtual ~DtLocalWeatherManager();
55 
57  static DtLocalWeatherManager& instance(makVrv::DtDe& de);
58 
60  static void registerInstance(makVrv::DtDe&, DtLocalWeatherManager*);
61 
62  virtual const WeatherObjects& weatherObjects() const
63  {
64  return myWeatherObjects;
65  }
66 
68  virtual bool hasEnvironment(const std::string&) const;
69 
72  virtual void setupCommand(DtChangeWeatherCommand& weatherCommand, const std::string& environment) const;
73 
76  virtual void setupCommand(DtChangeWeatherCommand& weatherCommand, const makArchives::DtEnvironmentRecord& environment) const;
77  virtual void setupRecord(makArchives::DtEnvironmentRecord& environment, const DtChangeWeatherCommand& weatherCommand) const;
78 
81  virtual void setupCommand(DtChangeWeatherCommand& weatherCommand, const makVrv::DtStateView<DtVrlinkSimulatedWeatherState>* environment) const;
82  virtual void setupRecord(makArchives::DtEnvironmentRecord& rec,
84 
86  virtual int nextPriority() const;
87 
89  virtual void setShowWeather(bool);
90  virtual bool showWeather() const;
91 
94  virtual void setWeatherAreaFilled(bool);
95  virtual bool weatherAreaFilled() const;
96 
98  virtual void setUseDayNightIlluminationModel(bool);
99  virtual bool useDayNightIlluminationModel() const;
100 
103  virtual void increasePriorityOf(makVrv::DtElementID);
104 
107  virtual void decreasePriorityOf(makVrv::DtElementID);
108 
110  virtual void bringWeatherToFront(makVrv::DtElementID);
111 
114  virtual void sendWeatherToBack(makVrv::DtElementID);
115 
118  virtual void changePriorityOf(makVrv::DtElementID, int);
119 
120  const GlobalWeatherObjects& globalWeatherObjects() const
121  {
122  return myGlobalWeatherObjects;
123  }
124 
125  bool hasGlobalWeather() const
126  {
127  return (myGlobalWeatherObjects.size() != 0);
128  }
129 
132  virtual void setTimeBasedOnCreation(bool, int session = -1);
133 
134  public:
137  virtual int addWeatherLookModificationOperation(const DtWeatherLookModificationOperation&);
138 
140  virtual void removeWeatherLookModificationOperation(int);
141 
143  virtual void insertWeatherLookModificationOperation(int, const DtWeatherLookModificationOperation&);
144 
145  virtual DtLocalWeatherLookOperationManager::WeatherLookModificationOperations weatherLookModificationOperations() const;
146 
149  virtual void modifyColorForWeather(const makArchives::DtEnvironmentRecord&, float& r, float& g, float& b, float& a) const;
150 
152  virtual std::string weatherLookModelDefinitionFor(const makArchives::DtEnvironmentRecord&) const;
153 
156  virtual void setLocalWeatherLookManager(DtLocalWeatherLookOperationManager*);
157 
159  DtLocalWeatherLookOperationManager* localWeatherLookManager() const
160  {
161  return myLocalWeatherOperationLookManager;
162  }
163 
165  virtual bool isTimeFrozen() const;
166 
168  virtual bool isTimeSetToLocalOnFirstPlacement();
169 
170  public:
172  boost::signal<void (makVrv::DtElementID)> signal_removed;
173 
175  boost::signal<void (const makVrv::DtStateView<DtVrlinkSimulatedEnvironmentProcess>*)> signal_updated;
176  boost::signal<void (const makVrv::DtStateView<DtVrlinkSimulatedWeatherState>*)> signal_weatherUpdated;
177 
180  boost::signal<void (makVrv::DtUniqueID, bool)> signal_isTimeFrozenChanged;
181  boost::signal<void (makVrv::DtUniqueID, bool)> signal_isTimeSetToLocalOnFirstPlacementChanged;
182 
184  boost::signal<void ()> signal_weatherLookRulesChanged;
185 
186  protected:
188  virtual void addIfWeatherObject(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
189 
190  virtual void slot_globalWeatherObjectStateUpdated(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
191 
192  virtual void weatherObjectAdded(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
193  virtual void weatherObjectRemoved(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
194 
195  virtual void globalWeatherObjectAdded(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
196  virtual void globalWeatherObjectRemoved(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
197 
199  virtual void initExistingWeatherObjects();
200 
201  virtual void slot_onWeatherUpdated(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
202  virtual void slot_onWeatherStateUpdated(const makVrv::DtStateView<DtVrlinkSimulatedWeatherState>* s);
203 
205  virtual void extendedApplicationOptionsChanged();
206 
209  virtual void offsetPriorityBy(makVrv::DtElementID id, int by);
210 
212  virtual void overlayAdded(const std::string&);
213 
215  virtual void overlayVisibilityChanged(const std::string&, bool);
216 
217  protected:
222 
224 
225  typedef std::map<makVrv::DtUniqueID, makVrv::DtSignalConnectionManager*> WeatherConnections;
228  };
229 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)