VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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>
14 #include <vrvUtil/DtUnicode.h>
15 #include <vrvCore/DtStateView.h>
16 #include <vrvUtil/signalslib.h>
21 
22 namespace makVrv
23 {
24  class DtDe;
25  class DtSimObjectEntry;
26  struct DtVrlinkSimulatedBaseState;
27 }
28 
29 namespace makVrf
30 {
31  struct DtVrlinkSimulatedEnvironmentProcess;
32  class DtWeatherLookModificationOperation;
33  class DtLocalWeatherLookOperationManager;
34 
36  {
37  public:
38  typedef std::map<makVrv::DtElementID, makVrv::DtStateView<DtVrlinkSimulatedEnvironmentProcess>*> WeatherObjects;
39 
40  public:
43 
45  virtual ~DtLocalWeatherManager();
46 
48  static DtLocalWeatherManager& instance(makVrv::DtDe& de);
49 
51  static void registerInstance(makVrv::DtDe&, DtLocalWeatherManager*);
52 
53  virtual const WeatherObjects& weatherObjects() const
54  {
55  return myWeatherObjects;
56  }
57 
59  virtual bool hasEnvironment(const std::string&) const;
60 
63  virtual void setupCommand(DtChangeWeatherCommand& weatherCommand, const std::string& environment) const;
64 
67  virtual void setupCommand(DtChangeWeatherCommand& weatherCommand, const makArchives::DtEnvironmentRecord& environment) const;
68  virtual void setupRecord(makArchives::DtEnvironmentRecord& environment, const DtChangeWeatherCommand& weatherCommand) const;
69 
72  virtual void setupCommand(DtChangeWeatherCommand& weatherCommand, const makVrv::DtStateView<DtVrlinkSimulatedWeatherState>* environment) const;
73  virtual void setupRecord(makArchives::DtEnvironmentRecord& rec,
75 
77  virtual int nextPriority() const;
78 
80  virtual void setShowWeather(bool);
81  virtual bool showWeather() const;
82 
85  virtual void setWeatherAreaFilled(bool);
86  virtual bool weatherAreaFilled() const;
87 
89  virtual void setUseDayNightIlluminationModel(bool);
90  virtual bool useDayNightIlluminationModel() const;
91 
94  virtual void increasePriorityOf(makVrv::DtElementID);
95 
98  virtual void decreasePriorityOf(makVrv::DtElementID);
99 
101  virtual void bringWeatherToFront(makVrv::DtElementID);
102 
105  virtual void sendWeatherToBack(makVrv::DtElementID);
106 
109  virtual void changePriorityOf(makVrv::DtElementID, int);
110 
111  public:
114  virtual int addWeatherLookModificationOperation(const DtWeatherLookModificationOperation&);
115 
117  virtual void removeWeatherLookModificationOperation(int);
118 
120  virtual void insertWeatherLookModificationOperation(int, const DtWeatherLookModificationOperation&);
121 
122  virtual DtLocalWeatherLookOperationManager::WeatherLookModificationOperations weatherLookModificationOperations() const;
123 
126  virtual void modifyColorForWeather(const makArchives::DtEnvironmentRecord&, float& r, float& g, float& b, float& a) const;
127 
129  virtual std::string weatherLookModelDefinitionFor(const makArchives::DtEnvironmentRecord&) const;
130 
133  virtual void setLocalWeatherLookManager(DtLocalWeatherLookOperationManager*);
134 
136  DtLocalWeatherLookOperationManager* localWeatherLookManager() const
137  {
138  return myLocalWeatherOperationLookManager;
139  }
140 
141  public:
143  boost::signal<void (makVrv::DtElementID)> signal_removed;
144 
146  boost::signal<void (const makVrv::DtStateView<DtVrlinkSimulatedEnvironmentProcess>*)> signal_updated;
147  boost::signal<void (const makVrv::DtStateView<DtVrlinkSimulatedWeatherState>*)> signal_weatherUpdated;
148 
150  boost::signal<void ()> signal_weatherLookRulesChanged;
151 
152  protected:
154  virtual void addIfWeatherObject(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
155  virtual void weatherObjectAdded(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
156  virtual void weatherObjectRemoved(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
157 
159  virtual void initExistingWeatherObjects();
160 
161  virtual void slot_onWeatherUpdated(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
162  virtual void slot_onWeatherStateUpdated(const makVrv::DtStateView<DtVrlinkSimulatedWeatherState>* s);
163 
165  virtual void extendedApplicationOptionsChanged();
166 
169  virtual void offsetPriorityBy(makVrv::DtElementID id, int by);
170 
172  virtual void overlayAdded(const std::string&);
173 
175  virtual void overlayVisibilityChanged(const std::string&, bool);
176 
177  protected:
182  };
183 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)