VR-Vantage API Documentation
envWeatherStateRec.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: envWeatherStateRec.h,v $ $Revision: 1.3 $ $State: Exp $
7 ** Created: 6/13/08 MEM
8 /*******************************************************************************/
9 
10 //
11 // File: envWeatherStateRec.h
12 //
13 // Class: DtVrfEnvironmentalWeatherStateRecord
14 //
15 #ifndef envWeatherStateRec_H_
16 #define envWeatherStateRec_H_
17 
18 #include <vl/envRec.h>
19 #include <vlpi/disEnums.h>
20 #include <vl/objDesList.h>
22 
23 // Definition of the FIXED PORTION of the weather state object.
24 // This will be followed by a variable length string of bytes to represent
25 // the object label, and 0 or more global object designators to represent
26 // any subordinate objects within the object represented.
27 
28 struct DtNetWeatherStateRecord : public DtNetEnvironmentalRecord
29 {
30  //DtNetEnvironmentalRecord myHeader;
31 
32  DtNetU32 myRecordVersion;
33  DtNetFloat64 myAirTurbidity;
34  DtNetU32 myCloudState;
37  DtNetFloat64 myVisibility;
38  DtNetFloat64 myWindDirection;
39  DtNetFloat64 myWindSpeed;
40  DtNetFloat64 myIllumination;
41  DtNetFloat64 myTimeOfDay;
43 };
44 
45 //
46 // Class Description: DtVrfEnvironmentalWeatherStateRecord
47 //
49 {
50 public:
51  // Default Constructor. To function properly, the state record should be
52  // initialized with an entity type. If you don't know it yet at creation
53  // time, you can use this constructor; but call setEntityType() before
54  // using the appearance accessors.
56 
57  // Copy Constructor
59 
60  // Assignment Operator
61  const DtVrfEnvironmentalWeatherStateRecord& operator=(
63 
64  // Destructor
66 
67  // Clone. Return a copy of this instance.
68  virtual DtEnvironmentalRecord* clone() const;
69 
70  // See #myAirTurbidity
72  virtual void setAirTurbidity(double value);
73  virtual double airTurbidity() const;
75 
76  // See #myCloudState
78  virtual void setCloudState(unsigned int value);
79  virtual unsigned int cloudState() const;
81 
82  // See #myPrecipitationIntensity
84  virtual void setPrecipitationIntensity(double value);
85  virtual double precipitationIntensity() const;
87 
88  // See #myPrecipitationType
90  virtual void setPrecipitationType(unsigned int value);
91  virtual unsigned int precipitationType() const;
93 
94  // See #myWindSpeed
96  virtual void setWindSpeed(double value);
97  virtual double windSpeed() const;
99 
100  // See #myWindDirection
102  virtual void setWindDirection(double value);
103  virtual double windDirection() const;
105 
106  // See #myVisibility
108  virtual void setVisibility(double value);
109  virtual double visibility() const;
111 
112  // See #myIllumination
114  virtual void setIllumination(double value);
115  virtual double illumination() const;
117 
118  // The number of seconds past midnight.
120  virtual void setTimeOfDay(double seconds);
121  virtual double timeOfDay() const;
123 
124  // The rate at which time of day is advancing, based on simulation time.
125  // For example, 0 indicates that TOD is paused, 1 means it is advancing normally.
127  virtual void setTimeOfDayAdvancementSpeed(double factor);
128  virtual double timeOfDayAdvancementSpeed() const;
130 
131  // This doesn't need to be called explicitly. If any routine that needs
132  // the repository finds that it hasn't been created yet, it calls this
133  // method.
134  virtual bool createNetworkRepresentation();
135 
136  // returns the network representation of the environmental record
137  const DtNetWeatherStateRecord* objStateNetRep() const;
138  DtNetWeatherStateRecord* objStateNetRep();
139 
140  // used by the PDU class to fill in the network representation
141  virtual void setFromNet(const DtNetEnvironmentalRecord& buffer);
142 
143  virtual int netRepSize() const;
144 
145 protected:
146 
147  virtual bool resizeNetRep(int newSize);
148 
149  // Casts the 'this' pointer for changing elements in a const function.
151 
152 
153 protected:
154 
156 };
157 
158 #endif // DIS_VERS >= 5


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)