VR-Forces 4.1 Class Documentation
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtSceneDriver Class Reference

The DtSceneDriver owns the scene. More...

Inheritance diagram for makVrv::DtSceneDriver:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtSceneDriver ()
 DTOR.
virtual bool onStart ()
 Called then this host is stared.
virtual bool onStop ()
 Called when this host is stopped.
virtual bool onTick ()
 Called when this host is ticked.
virtual const std::string & className () const
 Ge the class name for the scene driver.
bool saveScene (const std::string &filePath, bool saveAs=true)
 Save the scene to a file.
bool loadScene (const std::string &filePath)
 Load the scene from a file.
const std::string & sceneFileName () const
 Get the file name of the loaded scene.
DtScenefindScene ()
 Attempt to get the scene.
DtScenescene ()
 Get the scene object for the driver.
virtual void clearScene ()
 Removes all drawable objects from the scene.
- 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 Member Functions

 DtSceneDriver (DtDe &de)
 CTOR.
void reportPropCreated (const DtProp &prop)
 Report that a prop was created.
void reportPropDestroyed (const DtProp &prop)
 Report that a prop was destroyed.
void reportTerrainPatchCreated (const DtTerrainPatch &patch)
 Report that a terrain patch was created.
void reportTerrainPatchDestroyed (const DtTerrainPatch &patch)
 Report that a terrain patch was destroyed.
void reportFeatureCreated (const DtFeature &feature)
 Report that a feature was created.
void reportFeatureDestroyed (const DtFeature &feature)
 Report that a feature was destroyed.
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Called when a display engine is added.
virtual void slot_elementAttributeChangeRequested (DtUniqueID id, DtUniqueID parentId, DtBoost::shared_ptr< const DtElementAttribute > atr)
void handlePropElementChanged (DtProp &prop, const DtElementAttribute *attr)
- 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 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

std::string myClassName
DtDemyDe
DtScenemyScene
std::string mySceneFileName
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
bool myStartedFlag
std::string myName
DtConfiguration myConfiguration
bool myPersistentFlag
bool myUserControllableFlag
bool myRequestStateDiffPendingFlag
DtElementChanges myChanges

Friends

class DtSceneDriverCreator
 Allow the creator to create instances of the scene driver.

Detailed Description

The DtSceneDriver owns the scene.

Constructor & Destructor Documentation

virtual makVrv::DtSceneDriver::~DtSceneDriver ( )
virtual

DTOR.

makVrv::DtSceneDriver::DtSceneDriver ( DtDe de)
protected

CTOR.

Member Function Documentation

virtual bool makVrv::DtSceneDriver::onStart ( )
virtual

Called then this host is stared.

Implements makVrv::DtDriver.

virtual bool makVrv::DtSceneDriver::onStop ( )
virtual

Called when this host is stopped.

Implements makVrv::DtDriver.

virtual bool makVrv::DtSceneDriver::onTick ( )
virtual

Called when this host is ticked.

Implements makVrv::DtDriver.

virtual const std::string& makVrv::DtSceneDriver::className ( ) const
virtual

Ge the class name for the scene driver.

Implements makVrv::DtDriver.

bool makVrv::DtSceneDriver::saveScene ( const std::string &  filePath,
bool  saveAs = true 
)

Save the scene to a file.

Parameters
Input
filePathis the location of the file to save.
saveAsindicates whether saving the file sets the current filename.
bool makVrv::DtSceneDriver::loadScene ( const std::string &  filePath)

Load the scene from a file.

const std::string& makVrv::DtSceneDriver::sceneFileName ( ) const

Get the file name of the loaded scene.

Return values
""is the scene was not loaded/saved from a file.
DtScene* makVrv::DtSceneDriver::findScene ( )

Attempt to get the scene.

Return values
0is the scene driver is not started.
DtScene& makVrv::DtSceneDriver::scene ( )

Get the scene object for the driver.

Exceptions
DtCorruptedStateif the scene driver has not been started.
virtual void makVrv::DtSceneDriver::clearScene ( )
virtual

Removes all drawable objects from the scene.

This includes, Terrains, Props, trees, etc.

void makVrv::DtSceneDriver::reportPropCreated ( const DtProp prop)
protected

Report that a prop was created.

void makVrv::DtSceneDriver::reportPropDestroyed ( const DtProp prop)
protected

Report that a prop was destroyed.

void makVrv::DtSceneDriver::reportTerrainPatchCreated ( const DtTerrainPatch patch)
protected

Report that a terrain patch was created.

void makVrv::DtSceneDriver::reportTerrainPatchDestroyed ( const DtTerrainPatch patch)
protected

Report that a terrain patch was destroyed.

void makVrv::DtSceneDriver::reportFeatureCreated ( const DtFeature feature)
protected

Report that a feature was created.

void makVrv::DtSceneDriver::reportFeatureDestroyed ( const DtFeature feature)
protected

Report that a feature was destroyed.

virtual void makVrv::DtSceneDriver::slot_displayEngineAdded ( const DtDeRecord igRecord)
protectedvirtual

Called when a display engine is added.

This saves the scene and reloads it so the slaves are synced up with the terrain and environment.

Reimplemented from makVrv::DtDriver.

virtual void makVrv::DtSceneDriver::slot_elementAttributeChangeRequested ( DtUniqueID  id,
DtUniqueID  parentId,
DtBoost::shared_ptr< const DtElementAttribute atr 
)
protectedvirtual
void makVrv::DtSceneDriver::handlePropElementChanged ( DtProp prop,
const DtElementAttribute attr 
)
protected

Friends And Related Function Documentation

friend class DtSceneDriverCreator
friend

Allow the creator to create instances of the scene driver.

Member Data Documentation

std::string makVrv::DtSceneDriver::myClassName
protected
DtDe& makVrv::DtSceneDriver::myDe
protected
DtScene* makVrv::DtSceneDriver::myScene
protected
std::string makVrv::DtSceneDriver::mySceneFileName
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)