VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
ForestDriver Class Reference

The ForestDriver adds a forest to the scene. More...

Inheritance diagram for ForestDriver:
Inheritance graph
[legend]

Public Member Functions

 ForestDriver (makVrv::DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~ForestDriver ()
 DTOR.
virtual void buildRandomTrees (int numTrees, double width, double height)
virtual void getForestValues (int &numTrees, int &width, int &height)
virtual void removeAllTrees ()
virtual void useDefaultTreeDefinitions ()
virtual void useSpeedTreeDefinitions ()
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtDriver ()
 DTOR.
virtual void realizeConfiguration (const DtConfiguration &configuration)
 Realize the driver using the configuration.
virtual DtConfiguration createConfiguration () const
 Create a configuration for the driver.
DtAgentManageragentManager ()
 Get the master scene for this host.
virtual DtAgentManagerInterfacesceneInterface ()
 Get the scene manager interface for creating agents.
bool started () const
 Get this driver's active state.
virtual const std::string & instanceName () const
 Get this driver's instance name.
virtual bool autoStart () const
 Get whether this driver is set to automatically start if it is persistent.
virtual void setAutoStart (bool autoStart)
 Set whether this driver automatically starts if it is persistent.
virtual bool isWindowDependent () const
 Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsWindowDependent (bool dep)
 Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsUserControllable (bool)
 Set whether this driver can be started and stopped by the user.
virtual bool isUserControllable () const
 Get whether this driver can be started and stopped by the user.
virtual void setIsPersistent (bool per)
 Set if the driver is persistent and should be saved between runs.
virtual bool isPersistent () const
 Get if the driver is persistent and should be saved between runs.
virtual bool isOnDriverSelectionList () const
 Returns whether or not this driver is to be automatically started/stopped from the driver selection list.
virtual void setOnDriverSelectionList (bool)
 Sets whether or not this item is on the driver selection list.
bool objectFromAgentManager (const DtUniqueID &id) const
 check to see if the object was created using this driver's agent manager.

Protected Types

typedef std::vector< std::string > ModelDefinitionVector

Protected Member Functions

virtual void createDefaultTreeMappings ()
virtual void createSpeedTreeMappings ()
virtual bool onStart ()
 Start the host output.
virtual bool onStop ()
 Stop the host output.
virtual bool onTick ()
 Tick.
virtual const std::string & className () const
 Get the class name.
virtual bool makeForest ()
 Make a random forest.
virtual int randomInteger (int nMin, int nMax)
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 Function for apply changes from a changes object and deleting it.
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 Report an element created.
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 Report an element attribute changed.
void reportElementDestroyed (DtElementID id)
 Report an element destroyed.
void start ()
 Start the driver.
void stop ()
 Stop the driver.
bool tick ()
 Tick the host driver.
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Called when a display engine is added.
virtual void setInstanceName (const std::string &name)
 set the Instance name.
virtual void installAccessories ()
 Installs accessories on this driver.
virtual void uninstallAccessories ()
 Removes accessories from this driver.

Protected Attributes

makVrv::DtForestObjectAgent * myForestDriver
ModelDefinitionVector myModelDefVector
std::string myClassName
int myNumTrees
int myWidth
int myHeight
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
bool myStartedFlag
std::string myName
DtConfiguration myConfiguration
bool myPersistentFlag
bool myUserControllableFlag
bool myRequestStateDiffPendingFlag
DtElementChanges myChanges

Detailed Description

The ForestDriver adds a forest to the scene.

Member Typedef Documentation

typedef std::vector<std::string> ForestDriver::ModelDefinitionVector
protected

Constructor & Destructor Documentation

ForestDriver::ForestDriver ( makVrv::DtAgentManager agentManager,
const std::string &  instanceName 
)

CTOR.

virtual ForestDriver::~ForestDriver ( )
virtual

DTOR.

Member Function Documentation

virtual void ForestDriver::buildRandomTrees ( int  numTrees,
double  width,
double  height 
)
virtual
virtual void ForestDriver::getForestValues ( int numTrees,
int width,
int height 
)
virtual
virtual void ForestDriver::removeAllTrees ( )
virtual
virtual void ForestDriver::useDefaultTreeDefinitions ( )
virtual
virtual void ForestDriver::useSpeedTreeDefinitions ( )
virtual
virtual void ForestDriver::createDefaultTreeMappings ( )
protectedvirtual
virtual void ForestDriver::createSpeedTreeMappings ( )
protectedvirtual
virtual bool ForestDriver::onStart ( )
protectedvirtual

Start the host output.

Create all objects.

Implements makVrv::DtDriver.

virtual bool ForestDriver::onStop ( )
protectedvirtual

Stop the host output.

All scene object created by the host should be destroyed.

Implements makVrv::DtDriver.

virtual bool ForestDriver::onTick ( )
protectedvirtual

Tick.

Implements makVrv::DtDriver.

virtual const std::string& ForestDriver::className ( ) const
protectedvirtual

Get the class name.

Implements makVrv::DtDriver.

virtual bool ForestDriver::makeForest ( )
protectedvirtual

Make a random forest.

virtual int ForestDriver::randomInteger ( int  nMin,
int  nMax 
)
protectedvirtual

Member Data Documentation

makVrv::DtForestObjectAgent* ForestDriver::myForestDriver
protected
ModelDefinitionVector ForestDriver::myModelDefVector
protected
std::string ForestDriver::myClassName
protected
int ForestDriver::myNumTrees
protected
int ForestDriver::myWidth
protected
int ForestDriver::myHeight
protected

The documentation for this class was generated from the following file:

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)