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
appsrc
forestTestApp
forestDriver.h
Go to the documentation of this file.
1
//********************************************************************
2
// Copyright (c) 2008 MaK Technologies, Inc.
3
// All rights reserved.
4
//********************************************************************
5
//********************************************************************
6
// $RCSfile: forestDriver.h,v $ $Revision: 1.20 $ $State: Exp $
7
//********************************************************************
8
#ifndef forestDriver_h
9
#define forestDriver_h
10
11
12
#include <
vrvCore/DtDriver.h
>
13
#include <
vrvCore/DtModelDefinition.h
>
14
#include <vector>
15
#include <string>
16
17
namespace
makVrv
18
{
19
class
DtForestObjectAgent;
20
class
DtTreeModelAgent;
21
}
22
24
class
ForestDriver
:
public
makVrv::DtDriver
25
{
26
27
public
:
28
30
ForestDriver
(
makVrv::DtAgentManager
&
agentManager
,
const
std::string&
instanceName
);
31
33
virtual
~ForestDriver
();
34
35
virtual
void
buildRandomTrees
(
int
numTrees,
double
width,
double
height);
36
virtual
void
getForestValues
(
int
& numTrees,
int
& width,
int
& height);
37
virtual
void
removeAllTrees
();
38
virtual
void
useDefaultTreeDefinitions
();
39
virtual
void
useSpeedTreeDefinitions
();
40
41
protected
:
42
43
typedef
std::vector<std::string>
ModelDefinitionVector
;
44
45
virtual
void
createDefaultTreeMappings
();
46
virtual
void
createSpeedTreeMappings
();
47
50
virtual
bool
onStart
();
51
54
virtual
bool
onStop
();
55
57
virtual
bool
onTick
();
58
60
virtual
const
std::string&
className
()
const
;
61
62
protected
:
63
65
virtual
bool
makeForest
();
66
67
virtual
int
randomInteger
(
int
nMin,
int
nMax);
68
69
protected
:
70
71
makVrv::DtForestObjectAgent*
myForestDriver
;
72
ModelDefinitionVector
myModelDefVector
;
73
std::string
myClassName
;
74
int
myNumTrees
;
75
int
myWidth
;
76
int
myHeight
;
77
};
78
79
#endif
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
)