VR-Forces 4.8 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) 2014 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 
27  {
28  public:
29 
31  DtWindRotTickable(DtDe& de, DtElementID elementId, DtUniqueID sceneObjectId,
32  DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex);
33 
35  virtual ~DtWindRotTickable();
36 
38  virtual void update( DtTime tNow );
39 
48  virtual bool needsUpdate( DtTime tNow );
49 
51  virtual void configure(osg::Node* n, DtOsgArticulatedModel* osgArticulatedModel, const rapidjson::Value& windJsonData);
52 
53  public:
54  // @{
57  static const char* theWindRotFeatureName;
58  static const char* theTagDelayBeforeRot;
59  static const char* theTagDegPerKPH;
60  // @}
61 
62  protected:
65 
68 
71 
73  osgSim::DOFTransform* myWindRotNode;
74 
77  float myDegPerKPH;
78 
81  };
82 
86  {
87 
88  public:
89 
92 
94  virtual ~DtWindRotTickableCreator();
95 
97  virtual DtWindRotTickable* create(DtDe& de, osg::Node* node, DtOsgArticulatedModel* osgArticulatedModel,
98  const rapidjson::Value& jsonObject, const std::string& modelDefName,
99  const DtElementID elementId, const DtUniqueID uniqueId,
100  const bool useInstancing, const unsigned int nodeTypeIndex);
101 
102  };
103 }
The DtWindRotTickable rotates along X (like a fan blade) depending on the speed of the wind...
Definition: DtWindRotTickable.h:25
DtDynamicFeatureTickable is a tickable with extra information from .meta files for parameters for upd...
Definition: DtDynamicFeatureTickable.h:25
DtTime myLastUpdateTime
The last time update was called.
Definition: DtWindRotTickable.h:67
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtDynamicFeatureTickable class.
float myDegPerKPH
Definition: DtWindRotTickable.h:77
float myCurrRotInRad
The current radial position of the fan blades.
Definition: DtWindRotTickable.h:80
float myDelayBeforeRot
To constrain the rotation with respect to wind.
Definition: DtWindRotTickable.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
static const char * theWindRotFeatureName
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindRotTickable.h:57
static const char * theTagDelayBeforeRot
Definition: DtWindRotTickable.h:58
DtWindRotTickableCreator class.
Definition: DtWindRotTickable.h:85
IMGUI_API void Value(const char *prefix, bool b)
float myLastWindRot
Last wind rotation amount.
Definition: DtWindRotTickable.h:64
static const char * theTagDegPerKPH
Definition: DtWindRotTickable.h:59
Utility class for doing global unit conversion.
Definition: DtDisplayUnitsSettingsManager.h:59
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
osgSim::DOFTransform * myWindRotNode
The node affected by the update rotation calculations.
Definition: DtWindRotTickable.h:73
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:70
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)