VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>
14 #include <vector>
15 #include <string>
16 
17 namespace makVrv
18 {
19  class DtForestObjectAgent;
20  class DtTreeModelAgent;
21 }
22 
25 {
26 
27 public:
28 
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;
73  std::string myClassName;
75  int myWidth;
76  int myHeight;
77 };
78 
79 #endif
virtual void useDefaultTreeDefinitions()
virtual const std::string & className() const
Get the class name.
virtual int randomInteger(int nMin, int nMax)
virtual bool onStop()
Stop the host output.
virtual void useSpeedTreeDefinitions()
virtual void getForestValues(int &numTrees, int &width, int &height)
virtual void createSpeedTreeMappings()
std::string myClassName
Definition: forestDriver.h:73
virtual bool makeForest()
Make a random forest.
virtual void createDefaultTreeMappings()
The DtDriver is an abstract class.
Definition: DtDriver.h:34
virtual bool onTick()
Tick.
Interaction makVrv::DtModelDefinition class.
ForestDriver(makVrv::DtAgentManager &agentManager, const std::string &instanceName)
CTOR.
The DtAgentManager manages the distributed scene object framework.
Definition: DtAgentManager.h:38
makVrv::DtForestObjectAgent * myForestDriver
Definition: forestDriver.h:71
Contains makVrv:DtDriver class.
virtual const std::string & instanceName() const
Get this driver&#39;s instance name.
int myHeight
Definition: forestDriver.h:76
std::vector< std::string > ModelDefinitionVector
Definition: forestDriver.h:43
int myWidth
Definition: forestDriver.h:75
virtual void removeAllTrees()
The ForestDriver adds a forest to the scene.
Definition: forestDriver.h:24
ModelDefinitionVector myModelDefVector
Definition: forestDriver.h:72
int myNumTrees
Definition: forestDriver.h:74
virtual ~ForestDriver()
DTOR.
virtual void buildRandomTrees(int numTrees, double width, double height)
DtAgentManager & agentManager()
Get the master scene for this host.
virtual bool onStart()
Start the host output.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)