VR-Forces 4.3.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
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 <rapidjson/document.h>
13
#include <osgSim/MultiSwitch>
14
#include <
vrvOsg/DtDynamicFeatureTickable.h
>
15
#include <
vrvOsg/DtMetaObjectCreator.h
>
16
17
18
namespace
makVrv
19
{
20
class
DtDisplayUnitsConverter;
21
25
class
DT_DLL_VRVOSG
DtWindSwitchTickable
:
26
public
DtDynamicFeatureTickable
27
{
28
public
:
29
31
DtWindSwitchTickable
(
DtDe
& de,
DtElementID
elementId,
DtUniqueID
sceneObjectId,
32
DtUniqueID
uniqueId,
bool
useInstancing,
unsigned
int
nodeTypeIndex);
33
35
virtual
~
DtWindSwitchTickable
();
36
38
virtual
void
update(
DtTime
tNow );
39
48
virtual
bool
needsUpdate(
DtTime
tNow );
49
51
virtual
void
configure(osg::Node* n,
const
rapidjson::Value& windJsonData);
52
54
unsigned
int
getSwitchIndexForSpeed(
double
windSpeed);
55
56
public
:
57
// @{
60
static
const
char
*
theWindSwitchFeatureName
;
61
static
const
char
*
theTagWindSpeeds
;
62
static
const
char
*
theTagSwitchIndices
;
63
// @}
64
65
protected
:
67
float
myLastWindSpeed
;
68
70
DtDisplayUnitsConverter
&
myConverter
;
71
73
osgSim::MultiSwitch*
myWindSwitchNode
;
74
76
std::vector<double>
myWindSpeeds
;
77
std::vector<int>
mySwitchIndices
;
78
};
79
82
class
DT_DLL_VRVOSG
DtWindSwitchTickableCreator
:
public
DtMetaObjectCreator
83
{
84
85
public
:
86
88
DtWindSwitchTickableCreator
();
89
91
virtual
~
DtWindSwitchTickableCreator
();
92
94
virtual
DtWindSwitchTickable
* create(
DtDe
& de, osg::Node* node,
95
const
rapidjson::Value& jsonObject,
const
std::string& modelDefName,
96
const
DtElementID
elementId,
const
DtUniqueID
sceneObjectId,
97
const
DtUniqueID
uniqueId,
const
bool
useInstancing,
98
const
unsigned
int
nodeTypeIndex);
99
100
};
101
}
Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)