VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWindRotTickable.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvCore/vrvCore.h>
12 #include <rapidjson/document.h>
15 #include <osgSim/DOFTransform>
17 
18 namespace makVrv
19 {
20  class DtDisplayUnitsConverter;
21  class DtOsgArticulatedModel;
22 
28  {
29  public:
30 
32  DtWindRotTickable(DtDe& de, DtElementID elementId, DtUniqueID sceneObjectId,
33  DtUniqueID uniqueId, unsigned int nodeTypeIndex, DtOsgArticulatedModel* osgArticulatedModel);
34 
36  virtual ~DtWindRotTickable();
37 
39  virtual void update( DtTime tNow );
40 
49  virtual bool needsUpdate( DtTime tNow );
50 
52  virtual void configure(osg::Node* n, const rapidjson::Value& windJsonData);
53 
55  virtual void modelToBeDestroyed(DtModel* model);
56 
57  public:
58  // @{
61  static const char* theWindRotFeatureName;
62  static const char* theTagDelayBeforeRot;
63  static const char* theTagDegPerKPH;
64  // @}
65 
66  protected:
68  virtual void disconnectFromModel();
69 
70  protected:
73 
76 
79 
81  osgSim::DOFTransform* myWindRotNode;
82 
85  float myDegPerKPH;
86 
89 
91  };
92 
96  {
97 
98  public:
99 
102 
104  virtual ~DtWindRotTickableCreator();
105 
107  virtual DtWindRotTickable* create(DtDe& de, osg::Node* node, DtOsgArticulatedModel* osgArticulatedModel,
108  const rapidjson::Value& jsonObject, const std::string& modelDefName,
109  const DtElementID elementId, const DtUniqueID uniqueId
110  , const unsigned int nodeTypeIndex);
111 
112  };
113 }
The DtWindRotTickable rotates along X (like a fan blade) depending on the speed of the wind...
Definition: DtWindRotTickable.h:26
DtDynamicFeatureTickable is a tickable with extra information from .meta files for parameters for upd...
Definition: DtDynamicFeatureTickable.h:24
DtTime myLastUpdateTime
The last time update was called.
Definition: DtWindRotTickable.h:75
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtDynamicFeatureTickable class.
float myDegPerKPH
Definition: DtWindRotTickable.h:85
float myCurrRotInRad
The current radial position of the fan blades.
Definition: DtWindRotTickable.h:88
float myDelayBeforeRot
To constrain the rotation with respect to wind.
Definition: DtWindRotTickable.h:84
An articulated model manipulator for controlling an articulated model.
Definition: DtOsgArticulatedModel.h:67
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
float myLastWindSpeedKmPerHr
Last wind speed.
Definition: DtWindRotTickable.h:72
static const char * theWindRotFeatureName
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindRotTickable.h:61
static const char * theTagDelayBeforeRot
Definition: DtWindRotTickable.h:62
DtWindRotTickableCreator class.
Definition: DtWindRotTickable.h:95
IMGUI_API void Value(const char *prefix, bool b)
static const char * theTagDegPerKPH
Definition: DtWindRotTickable.h:63
Utility class for doing global unit conversion.
Definition: DtDisplayUnitsSettingsManager.h:59
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
osgSim::DOFTransform * myWindRotNode
The node affected by the update rotation calculations.
Definition: DtWindRotTickable.h:81
DtOsgArticulatedModel * myOsgArticulatedModel
Definition: DtWindRotTickable.h:90
A model which owns a single model instance.
Definition: DtModel.h:55
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains the makVrv::DtOsgArticulatedModel class declaration.
Contains makVrv::DtMetaObjectCreator class.
DtDisplayUnitsConverter & myConverter
To convert the wind speed to display units (km/h)
Definition: DtWindRotTickable.h:78
Abstract dynamic feature creator class.
Definition: DtMetaObjectCreator.h:28
Contains DLL export macros.

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)