VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtShipFlagDirTickable.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 <matrix/vlVector.h>
15 
16 #include <osgSim/DOFTransform>
17 
18 #include <rapidjson/document.h>
19 
20 namespace makVrv
21 {
22  class DtDisplayUnitsConverter;
23  class DtDeadReckonUpdater;
24 
30  {
31  public:
32 
34  DtShipFlagDirTickable(DtDe& de, DtElementID elementId, DtUniqueID sceneObjectId,
35  DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex);
36 
38  virtual ~DtShipFlagDirTickable();
39 
41  virtual void update( DtTime tNow );
42 
45  float calcRotAngleForShipFlag(DtSceneObject* sceneObj,
46  DtDeadReckonUpdater* updater, DtTime tNow,
47  const DtVector& windDirVec, float windSpeedKPH);
48 
50  DtVector computeWindVec(DtSceneObject* sceneObj, float windDirRad);
51 
60  virtual bool needsUpdate( DtTime tNow );
61 
63  virtual void configure(osg::Node* n, const rapidjson::Value& windJsonData);
64 
65  public:
66  // @{
69  static const char* theShipFlagDirFeatureName;
70  static const char* theTagRotOffsetDeg;
71  static const char* theTagRotDir;
72  static const char* theRotDirCW;
73  // @}
74 
75  protected:
78 
81 
84 
87 
89  osgSim::DOFTransform* myWindDirNode;
90 
93  float myRotOffset;
94 
96  float myRotDir;
97  };
98 
102  {
103 
104  public:
105 
108 
110  virtual ~DtShipFlagDirTickableCreator();
111 
113  virtual DtShipFlagDirTickable* create(DtDe& de, osg::Node* node,
114  DtOsgArticulatedModel* osgArticulatedMode,
115  const rapidjson::Value& jsonObject, const std::string& modelDefName,
116  const DtElementID elementId, const DtUniqueID uniqueId,
117  const bool useInstancing, const unsigned int nodeTypeIndex);
118 
119  };
120 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)