VR-Forces 5.0.2 Developer's Guide
 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 #ifndef forestDriver_h
6 #define forestDriver_h
7 
8 
9 #include <vrvCore/DtDriver.h>
11 #include <vector>
12 #include <string>
13 
14 namespace makVrv
15 {
16  class DtForestObjectAgent;
17  class DtTreeModelAgent;
18 }
19 
22 {
23 
24 public:
25 
28 
30  virtual ~ForestDriver();
31 
32  virtual void buildRandomTrees(int numTrees, double width, double height);
33  virtual void getForestValues(int& numTrees, int& width, int& height);
34  virtual void removeAllTrees();
35  virtual void useDefaultTreeDefinitions();
36  virtual void useSpeedTreeDefinitions();
37 
38 protected:
39 
40  typedef std::vector<std::string> ModelDefinitionVector;
41 
42  virtual void createDefaultTreeMappings();
43  virtual void createSpeedTreeMappings();
44 
47  virtual bool onStart();
48 
51  virtual bool onStop();
52 
54  virtual bool onTick();
55 
57  virtual const std::string& className() const;
58 
59 protected:
60 
62  virtual bool makeForest();
63 
64  virtual int randomInteger(int nMin, int nMax);
65 
66 protected:
67 
68  makVrv::DtForestObjectAgent* myForestDriver;
70  std::string myClassName;
72  int myWidth;
73  int myHeight;
74 };
75 
76 #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. All scene object created by the host should be destroyed.
virtual void useSpeedTreeDefinitions()
virtual void getForestValues(int &numTrees, int &width, int &height)
virtual void createSpeedTreeMappings()
std::string myClassName
Definition: forestDriver.h:70
virtual bool makeForest()
Make a random forest.
virtual void createDefaultTreeMappings()
The DtDriver is an abstract class. Developers derive from this to create logic that &quot;directs&quot; things ...
Definition: DtDriver.h:31
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. This includes the objects and upda...
Definition: DtAgentManager.h:38
makVrv::DtForestObjectAgent * myForestDriver
Definition: forestDriver.h:68
Contains makVrv:DtDriver class.
virtual const std::string & instanceName() const
Get this driver&#39;s instance name.
int myHeight
Definition: forestDriver.h:73
std::vector< std::string > ModelDefinitionVector
Definition: forestDriver.h:40
int myWidth
Definition: forestDriver.h:72
virtual void removeAllTrees()
The ForestDriver adds a forest to the scene.
Definition: forestDriver.h:21
ModelDefinitionVector myModelDefVector
Definition: forestDriver.h:69
int myNumTrees
Definition: forestDriver.h:71
virtual ~ForestDriver()
DTOR.
virtual void buildRandomTrees(int numTrees, double width, double height)
DtAgentManager & agentManager()
Get the master scene for this host. Do not create drivers using this agentManager, use the sceneInterface as it may replaced the implementation of the sceneInterface.
virtual bool onStart()
Start the host output. Create all objects.

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)