VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weatherObjectRepository.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
15 
19 {
20 public:
21 
23 
26 
27  // Utility to compare this repository against a remote estimate
28  // Returns True is an update should be sent; False otherwise
29  virtual bool sendNeeded(const DtEnvironmentProcessRepository& asSeenByRemote);
30 
31  void setClock(DtClock* clock);
32  DtClock* clock() const;
33 
34  double lastUpdateTime() const;
35  void setLastUpdateTime(DtTime t);
36 
39 
41  virtual void addWindLevel(const DtNetElevationalConfigurationStateRecord&);
42  virtual void addWindLevel(double altitude, double windSpeed, double windDirection, double visibilityDistance, int obscurant, int cloudType, double cloudDensity, double skyCoverage);
43  virtual void clearWindLevels();
44 
46  virtual void removeWindLevel(double baseAltitude);
47 
48  virtual std::vector<DtNetElevationalConfigurationStateRecord> windLevels() const;
50 
51 protected:
52 
53  virtual bool sendRecordsNeeded(const DtEnvironmentProcessRepository& asSeenByRemote);
54  virtual bool sendWeatherRecNeeded(DtTime dt, DtNetEnvironmentalRecord* rec, DtNetEnvironmentalRecord* recRemote);
55  virtual bool sendV3WeatherRecNeeded(DtTime dt, DtNetEnvironmentalRecord* rec, DtNetEnvironmentalRecord* recRemote);
56  virtual bool sendNetRecNeeded(DtNetEnvironmentalRecord* rec1, DtNetEnvironmentalRecord* rec2);
57  virtual DtStateRepository* clone(bool copy) const;
58 
59  virtual void updateDataRecords();
60  virtual void updateExtensions();
61 
62 protected:
63 
64  // Helpers for send-side dead reckoning (used to limit #updates sent)
67 
68  // Local representation of weather layers -- ordered by altitude
69  std::vector<DtNetElevationalConfigurationStateRecord> myWindLevels;
70 
72 };
virtual void updateDataRecords()
If myNeedVrfObjectDataUpdate is true, update the vrf object data record.
virtual DtStateRepository * clone(bool copy=false) const
Return a copy/empty object of the same type as this.
static DtEnvironmentProcessRepository * create()
This class creates a network state repository to aid sending weather area objects.
Definition: weatherObjectRepository.h:17
DtClock * myClock
Definition: weatherObjectRepository.h:65
virtual void updateExtensions()
Overridden to update property data.
Contains the DtExtEntityStateRepository class.
DtControlObjectRepository class extends the DtControlObjectBaseRepository to be able to handle extend...
Definition: controlObjectRepository.h:27
bool myNeedsWindLevelUpdate
Definition: weatherObjectRepository.h:71
DtTime myLastUpdateTime
Definition: weatherObjectRepository.h:66
Definition: vrfElevationalConfigurationStateRecord.h:18
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23
std::vector< DtNetElevationalConfigurationStateRecord > myWindLevels
Definition: weatherObjectRepository.h:69

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)