VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 <rapidjson/document.h>
13 #include <osgSim/MultiSwitch>
16 
17 
18 namespace makVrv
19 {
20  class DtDisplayUnitsConverter;
21 
27  {
28  public:
29 
31  DtWindSwitchTickable(DtDe& de, DtElementID elementId, DtUniqueID sceneObjectId,
32  DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex);
33 
35  virtual ~DtWindSwitchTickable();
36 
38  virtual void update( DtTime tNow );
39 
48  virtual bool needsUpdate( DtTime tNow );
49 
51  virtual void configure(osg::Node* n, const rapidjson::Value& windJsonData);
52 
54  unsigned int getSwitchIndexForSpeed(double windSpeed);
55 
56  public:
57  // @{
60  static const char* theWindSwitchFeatureName;
61  static const char* theTagWindSpeeds;
62  static const char* theTagSwitchIndices;
63  // @}
64 
65  protected:
68 
71 
73  osgSim::MultiSwitch* myWindSwitchNode;
74 
76  std::vector<double> myWindSpeeds;
77  std::vector<int> mySwitchIndices;
78  };
79 
83  {
84 
85  public:
86 
89 
91  virtual ~DtWindSwitchTickableCreator();
92 
94  virtual DtWindSwitchTickable* create(DtDe& de, osg::Node* node,
95  const rapidjson::Value& jsonObject, const std::string& modelDefName,
96  const DtElementID elementId, const DtUniqueID sceneObjectId,
97  const DtUniqueID uniqueId, const bool useInstancing,
98  const unsigned int nodeTypeIndex);
99 
100  };
101 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)