![]() |
VR-Forces 4.1 Class Documentation
|
DtRemoteEnvironmentController allows the user to interrogate the back-end which is simulating the environmental weather object to get the current weather state. More...
Public Member Functions | |
| DtRemoteEnvironmentController () | |
| Constructor. | |
| virtual void | init (DtVrfMessageInterface *msgIf, DtReflectedEnvironmentProcessList *rel) |
| Caches the given pointers as myMsgIf and myReflectedEnvironmentProcessList. | |
| bool | reflectingCurrentWeatherState () |
| Indicates if the weather state of the back-end simulating the weather has been reflected. | |
| virtual void | processEnvironmentProcessAdded (DtReflectedEnvironmentProcess *obj) |
| Checks to see if the first recordPointer in the state repository of the DtReflectedEnvironmentProcess is of type DtEnvVrfWeatherStateRecordType, and if so it caches a pointer to the SR in myReflectedWeatherSR. | |
| virtual void | processEnvironmentProcessRemoved (DtReflectedEnvironmentProcess *obj) |
| Checks to see if the DtReflectedEnvironmentProcess being removed corresponds to the one cached in myReflectedWeatherSR, and if so myReflectedWeatherSR is set to 0. | |
| virtual void | setAirTurbidity (double value) |
| Air Turbidity. | |
| virtual double | airTurbidity () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setCloudState (DtVrfWeatherCloudState) |
| Cloud State. | |
| virtual DtVrfWeatherCloudState | cloudState () |
| If !reflectingCurrentWeatherState(), the default is DtVrfWeatherCloudStateClear. | |
| virtual void | setPrecipitationIntensity (double value) |
| Precipitation Intensity. | |
| virtual double | precipitationIntensity () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setPrecipitationType (DtVrfWeatherPrecipitationType) |
| Precipitation Intensity. | |
| virtual DtVrfWeatherPrecipitationType | precipitationType () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setWindSpeed (double value) |
| Wind speed in m/s. | |
| virtual double | windSpeed () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setWindDirection (double value) |
| Wind direction in radians. | |
| virtual double | windDirection () |
| If !reflectingCurrentWeatherState(), the default is 0.0. | |
| virtual void | setVisibility (double value) |
| Visibility in meters. | |
| virtual double | visibility () |
| If !reflectingCurrentWeatherState(), the default is 16,000 (16km) | |
| virtual double | illumination () |
| Illumination in percentage (0 to 1.0). | |
| virtual void | setTimeOfDay (double secondsPastMidnight) |
| The current time of day, specified by the number of seconds passed midnight. | |
| virtual double | timeOfDay () |
| If !reflectingCurrentWeatherState(), the default is 43200 (12:00 noon) | |
| virtual void | setTimeOfDayAdvancementSpeed (double speed) |
| The current time of day advancement speed. | |
| virtual double | timeOfDayAdvancementSpeed () |
| If !reflectingCurrentWeatherState(), the default is 0 (no advance) | |
Static Public Member Functions | |
| static void | environmentProcessAddedCallback (DtReflectedEnvironmentProcess *obj, void *userData) |
| Registered by onInit, calls processEnvironmentProcessAdded. | |
| static void | environmentProcessRemovedCallback (DtReflectedEnvironmentProcess *obj, void *userData) |
| Registered by onInit, calls processEnvironmentProcessRemoved. | |
Protected Member Functions | |
| bool | updateVrfEnvironmentalWeatherStateRecord () |
| Called by all the weather accessors to update myVrfEnvironmentalWeatherStateRecord from DtEnvironmentProcessRepository. | |
| virtual void | processUpdatedCallback (DtReflectedEnvironmentProcess *e) |
Static Protected Member Functions | |
| static void | environmentProcessUpdatedCallback (DtReflectedEnvironmentProcess *e, void *usr) |
| Update internal data structures. | |
DtRemoteEnvironmentController allows the user to interrogate the back-end which is simulating the environmental weather object to get the current weather state.
Sim commands can also be sent to change the weather state. If there is no weather state available, the accessors will all provide reasonable default values which represent a clear, windless and sunny environment state. The user can check to see if the back-end's weather values are being reflected by calling reflectingCurrentWeatherState().
| DtRemoteEnvironmentController::DtRemoteEnvironmentController | ( | ) |
Constructor.
|
virtual |
Caches the given pointers as myMsgIf and myReflectedEnvironmentProcessList.
Registers environmentProcessAddedCallback and environmentProcessRemovedCallback with the DtReflectedEnvironmentProcessList. In order to check to see if the environment object has already been reflected, the environment list is walked and each reflected object is passed to processEnvironmentProcessAdded.
| bool DtRemoteEnvironmentController::reflectingCurrentWeatherState | ( | ) |
Indicates if the weather state of the back-end simulating the weather has been reflected.
Unless this returns true, none of the accessors will return real data!
|
virtual |
Air Turbidity.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Cloud State.
|
virtual |
If !reflectingCurrentWeatherState(), the default is DtVrfWeatherCloudStateClear.
|
virtual |
Precipitation Intensity.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Precipitation Intensity.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Wind speed in m/s.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Wind direction in radians.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0.0.
|
virtual |
Visibility in meters.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 16,000 (16km)
|
virtual |
Illumination in percentage (0 to 1.0).
Illumination cannot be set directly. It is a function of time of day. If !reflectingCurrentWeatherState() is default is 1.0 (100% illumination)
|
virtual |
The current time of day, specified by the number of seconds passed midnight.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 43200 (12:00 noon)
|
virtual |
The current time of day advancement speed.
|
virtual |
If !reflectingCurrentWeatherState(), the default is 0 (no advance)
|
static |
Registered by onInit, calls processEnvironmentProcessAdded.
|
virtual |
Checks to see if the first recordPointer in the state repository of the DtReflectedEnvironmentProcess is of type DtEnvVrfWeatherStateRecordType, and if so it caches a pointer to the SR in myReflectedWeatherSR.
|
static |
Registered by onInit, calls processEnvironmentProcessRemoved.
|
virtual |
Checks to see if the DtReflectedEnvironmentProcess being removed corresponds to the one cached in myReflectedWeatherSR, and if so myReflectedWeatherSR is set to 0.
|
protected |
Called by all the weather accessors to update myVrfEnvironmentalWeatherStateRecord from DtEnvironmentProcessRepository.
|
staticprotected |
Update internal data structures.
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |