VR-Forces 5.0.2 Developer's Guide
 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) 2020 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  class DtOsgArticulatedModel;
21  class DtModel;
22 
28  {
29  public:
30 
32  DtWindDirTickable(DtDe& de, DtElementID elementId, DtUniqueID sceneObjectId,
33  DtUniqueID uniqueId, unsigned int nodeTypeIndex, DtOsgArticulatedModel* osgArticulatedModel);
34 
36  virtual ~DtWindDirTickable();
37 
39  virtual void update( DtTime tNow );
40 
49  virtual bool needsUpdate( DtTime tNow );
50 
52  virtual void configure(osg::Node* node, const rapidjson::Value& windJsonData);
53 
55  virtual void modelToBeDestroyed(DtModel* model);
56 
57  public:
58  // @{
61  static const char* theWindDirFeatureName;
62  static const char* theTagRotOffsetDeg;
63  static const char* theTagRotDir;
64  static const char* theRotDirCW;
65  // @}
66 
67  protected:
69  virtual void disconnectFromModel();
70 
71  protected:
74 
76  osgSim::DOFTransform* myWindDirNode;
77 
80 
83  float myRotOffset;
84 
86  float myRotDir;
87 
89  };
90 
94  {
95 
96  public:
97 
100 
102  virtual ~DtWindDirTickableCreator();
103 
105  virtual DtWindDirTickable* create(DtDe& de, osg::Node* node,
106  DtOsgArticulatedModel* osgArticulatedModel,
107  const rapidjson::Value& jsonObject, const std::string& modelDefName,
108  const DtElementID elementId, const DtUniqueID uniqueId
109  , const unsigned int nodeTypeIndex);
110 
111  };
112 }
static const char * theRotDirCW
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindDirTickable.h:64
static const char * theWindDirFeatureName
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindDirTickable.h:61
DtDynamicFeatureTickable is a tickable with extra information from .meta files for parameters for upd...
Definition: DtDynamicFeatureTickable.h:24
static const char * theTagRotDir
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindDirTickable.h:63
#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. Supports indirect rendering of...
Definition: DtOsgArticulatedModel.h:69
osgSim::DOFTransform * myWindDirNode
Transform for the wind to act upon.
Definition: DtWindDirTickable.h:76
DtOsgArticulatedModel * myOsgArticulatedModel
Definition: DtWindDirTickable.h:88
The DtWindDirTickable updates a transform node to rotate into the direction of the wind...
Definition: DtWindDirTickable.h:26
IMGUI_API void Value(const char *prefix, bool b)
DtSkyObjectManager & mySkyObjectManager
To find the sky object.
Definition: DtWindDirTickable.h:79
static const char * theTagRotOffsetDeg
Strings to get the different parts of the meta file Use these instead of hardcoded strings...
Definition: DtWindDirTickable.h:62
float myRotOffset
The rotation offset to bring the model&#39;s rotation in line with the wind&#39;s direction.
Definition: DtWindDirTickable.h:83
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:55
DtWindDirTickableCreator class.
Definition: DtWindDirTickable.h:93
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
Contains makVrv::DtMetaObjectCreator class.
float myLastWindDir
Last update wind direction.
Definition: DtWindDirTickable.h:73
float myRotDir
Clockwise or counterclockwise rotation.
Definition: DtWindDirTickable.h:86
Abstract dynamic feature creator class. A dynamic feature retrieves data from a .meta file and applie...
Definition: DtMetaObjectCreator.h:28
Contains DLL export macros.

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)