VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvOsg
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>
13
#include <
vrvOsg/DtDynamicFeatureTickable.h
>
14
#include <
vrvOsg/DtMetaObjectCreator.h
>
15
#include <osgSim/DOFTransform>
16
#include <
vrvOsg/DtOsgArticulatedModel.h
>
17
18
namespace
makVrv
19
{
20
class
DtDisplayUnitsConverter;
21
25
class
DT_DLL_VRVOSG
DtWindRotTickable
:
26
public
DtDynamicFeatureTickable
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
:
64
float
myLastWindRot
;
65
67
DtTime
myLastUpdateTime
;
68
70
DtDisplayUnitsConverter
&
myConverter
;
71
73
osgSim::DOFTransform*
myWindRotNode
;
74
76
float
myDelayBeforeRot
;
77
float
myDegPerKPH
;
78
80
float
myCurrRotInRad
;
81
};
82
85
class
DT_DLL_VRVOSG
DtWindRotTickableCreator
:
public
DtMetaObjectCreator
86
{
87
88
public
:
89
91
DtWindRotTickableCreator
();
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
}
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
)