VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWindSwitchTickable.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvCore/vrvCore.h>
12 #include <osgSim/MultiSwitch>
15 
16 
17 namespace makVrv
18 {
19  class DtDisplayUnitsConverter;
20 
26  {
27  public:
28 
30  DtWindSwitchTickable(DtDe& de, DtElementID elementId, DtUniqueID sceneObjectId,
31  DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex);
32 
34  virtual ~DtWindSwitchTickable();
35 
37  virtual void update( DtTime tNow );
38 
47  virtual bool needsUpdate( DtTime tNow );
48 
50  virtual void configure(osg::Node* n, DtOsgArticulatedModel* osgArticulatedModel, const rapidjson::Value& windJsonData);
51 
53  unsigned int getSwitchIndexForSpeed(double windSpeed);
54 
55  public:
56  // @{
59  static const char* theWindSwitchFeatureName;
60  static const char* theTagWindSpeeds;
61  static const char* theTagSwitchIndices;
62  // @}
63 
64  protected:
67 
70 
72  osgSim::MultiSwitch* myWindSwitchNode;
73 
75  std::vector<double> myWindSpeeds;
76  std::vector<int> mySwitchIndices;
77  };
78 
82  {
83 
84  public:
85 
88 
90  virtual ~DtWindSwitchTickableCreator();
91 
93  virtual DtWindSwitchTickable* create(DtDe& de, osg::Node* node,
94  DtOsgArticulatedModel* osgArticulatedModel,
95  const rapidjson::Value& jsonObject, const std::string& modelDefName,
96  const DtElementID elementId, const DtUniqueID uniqueId,
97  const bool useInstancing, const unsigned int nodeTypeIndex);
98 
99  };
100 }
float myLastWindSpeed
Last update wind speed.
Definition: DtWindSwitchTickable.h:66
DtDynamicFeatureTickable is a tickable with extra information from .meta files for parameters for upd...
Definition: DtDynamicFeatureTickable.h:25
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtDynamicFeatureTickable class.
DtDisplayUnitsConverter & myConverter
To convert the wind speed to display units (km/h)
Definition: DtWindSwitchTickable.h:69
std::vector< int > mySwitchIndices
Definition: DtWindSwitchTickable.h:76
An articulated model manipulator for controlling an articulated model.
Definition: DtOsgArticulatedModel.h:56
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:26
osgSim::MultiSwitch * myWindSwitchNode
The actual node that contains switch states.
Definition: DtWindSwitchTickable.h:72
static const char * theWindSwitchFeatureName
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindSwitchTickable.h:59
IMGUI_API void Value(const char *prefix, bool b)
std::vector< double > myWindSpeeds
Windspeeds.
Definition: DtWindSwitchTickable.h:75
static const char * theTagWindSpeeds
Definition: DtWindSwitchTickable.h:60
Utility class for doing global unit conversion.
Definition: DtDisplayUnitsSettingsManager.h:59
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
DtWindSwitchTickableCreator class.
Definition: DtWindSwitchTickable.h:81
The DtWindSwitchTickable class is responsible for switching nodes based on the current wind speed...
Definition: DtWindSwitchTickable.h:24
static const char * theTagSwitchIndices
Definition: DtWindSwitchTickable.h:61
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains makVrv::DtMetaObjectCreator class.
Abstract dynamic feature creator class.
Definition: DtMetaObjectCreator.h:28
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)