VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWindDirTickable.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>
14 #include <osgSim/DOFTransform>
15 
16 namespace makVrv
17 {
18  class DtDisplayUnitsConverter;
19  class DtSkyObjectManager;
20 
26  {
27  public:
28 
30  DtWindDirTickable(DtDe& de, DtElementID elementId, DtUniqueID sceneObjectId,
31  DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex);
32 
34  virtual ~DtWindDirTickable();
35 
37  virtual void update( DtTime tNow );
38 
47  virtual bool needsUpdate( DtTime tNow );
48 
50  virtual void configure(osg::Node* n, const rapidjson::Value& windJsonData);
51 
52  public:
53  // @{
56  static const char* theWindDirFeatureName;
57  static const char* theTagRotOffsetDeg;
58  static const char* theTagRotDir;
59  static const char* theRotDirCW;
60  // @}
61 
62  protected:
65 
67  osgSim::DOFTransform* myWindDirNode;
68 
71 
74  float myRotOffset;
75 
77  float myRotDir;
78  };
79 
83  {
84 
85  public:
86 
89 
91  virtual ~DtWindDirTickableCreator();
92 
94  virtual DtWindDirTickable* create(DtDe& de, osg::Node* node,
95  DtOsgArticulatedModel* osgArticulatedModel,
96  const rapidjson::Value& jsonObject, const std::string& modelDefName,
97  const DtElementID elementId, const DtUniqueID uniqueId,
98  const bool useInstancing, const unsigned int nodeTypeIndex);
99 
100  };
101 }
static const char * theRotDirCW
Definition: DtWindDirTickable.h:59
static const char * theWindDirFeatureName
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindDirTickable.h:56
DtDynamicFeatureTickable is a tickable with extra information from .meta files for parameters for upd...
Definition: DtDynamicFeatureTickable.h:25
static const char * theTagRotDir
Definition: DtWindDirTickable.h:58
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtDynamicFeatureTickable class.
Definition: DtSkyObjectManager.h:23
An articulated model manipulator for controlling an articulated model.
Definition: DtOsgArticulatedModel.h:56
osgSim::DOFTransform * myWindDirNode
Transform for the wind to act upon.
Definition: DtWindDirTickable.h:67
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:26
The DtWindDirTickable updates a transform node to rotate into the direction of the wind...
Definition: DtWindDirTickable.h:24
IMGUI_API void Value(const char *prefix, bool b)
DtSkyObjectManager & mySkyObjectManager
To find the sky object.
Definition: DtWindDirTickable.h:70
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
static const char * theTagRotOffsetDeg
Definition: DtWindDirTickable.h:57
float myRotOffset
The rotation offset to bring the model&#39;s rotation in line with the wind&#39;s direction.
Definition: DtWindDirTickable.h:74
DtWindDirTickableCreator class.
Definition: DtWindDirTickable.h:82
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains makVrv::DtMetaObjectCreator class.
float myLastWindDir
Last update wind direction.
Definition: DtWindDirTickable.h:64
float myRotDir
Clockwise or counterclockwise rotation.
Definition: DtWindDirTickable.h:77
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)