VR-Forces 4.5 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
vrvCore
DtDynamicTerrainObject.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2016 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvCore/DtTickable.h
>
13
#include <
vrvCore/DtUniqueID.h
>
14
#include <
vrvCore/DtDynamicTerrainWorld.h
>
15
16
#include <matrix/vlVector.h>
17
18
#include <boost/signals.hpp>
19
20
#include <utility>
// std::pair
21
#include <string>
22
23
namespace
makVrv
24
{
25
class
DtDe;
26
33
class
DT_DLL_VRVCORE
DtDynamicTerrainObject
:
public
DtTickable
34
{
35
protected
:
36
40
class
DynamicTerrainItem
41
{
42
public
:
43
DynamicTerrainItem
()
44
: myRequestHandle()
45
, myIsDirty(false)
46
, myRadius(1)
47
, myPriority(0)
48
{
49
}
50
51
DtVector
myLocation
;
52
double
myRadius
;
53
std::list< std::pair<std::string, std::string> >
myData
;
54
double
myPriority
;
55
DtDynamicTerrainWorld::RequestHandle
myRequestHandle
;
// may be 'empty'
56
bool
myIsDirty
;
// keep track so we don't get added to the dirty list multiple times
57
};
58
60
typedef
std::vector<DynamicTerrainItem*>
DynamicTerrainVector
;
61
62
public
:
63
67
DtDynamicTerrainObject
(
DtDe
& de,
DtUniqueID
id
);
68
69
//Not copyable
70
DtDynamicTerrainObject
(
const
DtDynamicTerrainObject
& copy);
71
72
//Not assignable
73
DtDynamicTerrainObject
& operator =(
const
DtDynamicTerrainObject
& copy);
74
75
private
:
77
DtDynamicTerrainObject
();
78
79
public
:
81
virtual
~
DtDynamicTerrainObject
();
82
85
virtual
void
update(
DtTime
tNow );
86
97
virtual
bool
needsUpdate(
DtTime
tNow );
98
100
inline
DtUniqueID
uniqueId()
const
101
{
102
return
myUniqueId;
103
}
105
106
111
virtual
void
addGeometry(
int
index,
const
DtVector
& location,
double
radius,
double
priority );
112
114
virtual
void
changeGeometry(
int
index,
const
DtVector
& location,
double
radius,
double
priority );
115
117
virtual
void
clearData(
int
index );
118
120
virtual
void
addData(
int
index,
const
std::string& key,
const
std::string& value,
double
priority );
121
123
124
protected
:
126
127
130
virtual
void
makeDirty( DynamicTerrainItem* item,
int
index );
131
134
virtual
DynamicTerrainItem* getDynamicTerrainItem(
int
index );
136
137
protected
:
138
140
DtDe
&
myDe
;
141
143
DtUniqueID
myUniqueId
;
144
145
DynamicTerrainVector
myDynamicTerrainVector
;
146
typedef
std::list<int>
DirtyList
;
147
DirtyList
myDirtyList
;
148
};
149
}
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)