VR-Forces 4.7 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
DtWindSwitchTickable.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 <osgSim/MultiSwitch>
13
#include <
vrvOsg/DtDynamicFeatureTickable.h
>
14
#include <
vrvOsg/DtMetaObjectCreator.h
>
15
16
17
namespace
makVrv
18
{
19
class
DtDisplayUnitsConverter;
20
24
class
DT_DLL_VRVOSG
DtWindSwitchTickable
:
25
public
DtDynamicFeatureTickable
26
{
27
public
:
28
30
DtWindSwitchTickable
(
DtDe
& de,
DtElementID
elementId,
DtUniqueID
sceneObjectId,
31
DtUniqueID
uniqueId,
bool
useInstancing,
unsigned
int
nodeTypeIndex);
32
34
virtual
~
DtWindSwitchTickable
();
35
37
virtual
void
update(
DtTime
tNow );
38
47
virtual
bool
needsUpdate(
DtTime
tNow );
48
50
virtual
void
configure(osg::Node* n,
DtOsgArticulatedModel
* osgArticulatedModel,
const
rapidjson::Value
& windJsonData);
51
53
unsigned
int
getSwitchIndexForSpeed(
double
windSpeed);
54
55
public
:
56
// @{
59
static
const
char
*
theWindSwitchFeatureName
;
60
static
const
char
*
theTagWindSpeeds
;
61
static
const
char
*
theTagSwitchIndices
;
62
// @}
63
64
protected
:
66
float
myLastWindSpeed
;
67
69
DtDisplayUnitsConverter
&
myConverter
;
70
72
osgSim::MultiSwitch*
myWindSwitchNode
;
73
75
std::vector<double>
myWindSpeeds
;
76
std::vector<int>
mySwitchIndices
;
77
};
78
81
class
DT_DLL_VRVOSG
DtWindSwitchTickableCreator
:
public
DtMetaObjectCreator
82
{
83
84
public
:
85
87
DtWindSwitchTickableCreator
();
88
90
virtual
~
DtWindSwitchTickableCreator
();
91
93
virtual
DtWindSwitchTickable
* create(
DtDe
& de, osg::Node* node,
94
DtOsgArticulatedModel
* osgArticulatedModel,
95
const
rapidjson::Value
& jsonObject,
const
std::string& modelDefName,
96
const
DtElementID
elementId,
const
DtUniqueID
uniqueId,
97
const
bool
useInstancing,
const
unsigned
int
nodeTypeIndex);
98
99
};
100
}
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)