VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrv::DtDeSharedState Class Reference

The DtDeSharedState represents all the data that is shared between the master and its slaves. More...

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

List of all members.

Public Member Functions

virtual ~DtDeSharedState ()
 DTOR.
virtual void initialize ()
 Called during DtDe::initialize().
virtual void initializeSharedChangeManager ()
 Initializes the shared change state manager with change state objects that are currently part of the system.
void setAutoSave (bool b)
bool autoSave () const
Model Definition methods
virtual const
DtModelDefinitionManager
modelDefinitionManager () const
 DtModelDefinitionManager accessor.
virtual DtModelDefinitionManagermodelDefinitionManager ()
 DtModelDefinitionManager accessor.
virtual const
DtModelSetRealizationManager
modelSetRealizationManager () const
 DtModelSetRealizationManager accessor.
virtual void setVisualizeModelSet (int modelset, bool visualize)
 Indicate that a model set should be visualized.
virtual void addModelDefinition (const DtModelDefinition &definition)
 Adds a model definition to the DtDe.
virtual void setModelDefinitionManager (const DtModelDefinitionManager &definition)
 Sets model definition manager in the DtDe.
virtual void renameModelDefinition (const DtModelDefinition &old, const DtModelDefinition &newDef)
 Renames model definition to the DtDe.
virtual void destroyModelDefinition (const DtModelDefinition &definition)
 Destroys a model definition from the DtDe.
virtual void setModelInstancingEnabled (bool)
 Set if model instance sharing is enabled.
virtual void clearModelInstancingCache ()
 Clears the cache of all model definitions.
Coordinate system methods
virtual void setCoordinateSystem (const std::string &coordinateSystemName, const std::string &coordinateSystemParameters)
 Set the coordinate system.
const DtCoordinateSystemcoordinateSystem () const
 Get the coordinate system.
DtCoordinateSystemcoordinateSystem ()
 Set the coordinate system.
Time methods
virtual void setDateAndTime (int year, DtDeTimeManager::Month month, int dayOfMonth, int hour, int minutes, double seconds)
 Set the current date and time of the scene.
virtual void setTimeScale (double timeScale)
 Set the current time scale relative to simulation time.
const DtDeTimeManagertimeManager () const
 Access the constant time manager for getting the date and time.
virtual void setWireframeMode (bool state)
 state functions
virtual bool wireframeMode () const
 state functions
virtual bool terrainScalingEnabled () const
 terrain scaling state functions
virtual void setTerrainScalingEnabled (bool enabled)
 state functions
virtual double terrainScaleFactor () const
 state functions
virtual void setTerrainScaleFactor (double scaleFactor)
 state functions
virtual bool clearTrackHistoryOnTerrainScaleChanged () const
 state functions
virtual void setClearTrackHistoryOnTerrainScaleChanged (bool clear)
 state functions
virtual void setPlanViewGeocentricOccludedTransparency (float f)
 occluded transparency state functions
virtual float planViewGeocentricOccludedTransparency () const
 state functions
virtual void setPerformanceOverlayOn (bool enabled)
 state functions
virtual bool performanceOverlayEnabled () const
 state functions
virtual void setShadowState (bool shadowMode, int shadowQuality, bool entityMode, bool propMode, bool terrainMode)
 shadow state functions
virtual bool shadowMode () const
 state functions
virtual int shadowQuality () const
 state functions
virtual bool entityShadowMode () const
 state functions
virtual bool propShadowMode () const
 state functions
virtual bool terrainShadowMode () const
 state functions
virtual void loadRenderSettings (const std::string &filepath)
 state functions
virtual void saveRenderSettings (const std::string &filepath)
 state functions
virtual void loadDefaultRenderSettings (bool useOnlyFactorySettings)
 state functions
virtual void saveDefaultRenderSettings ()
 state functions
virtual void updateRenderState ()
 state functions
virtual void setDdsFlip (bool state)
 Loader settings functions.
virtual bool ddsFlip () const
 Get the global DDS flip option.
virtual void loadLoaderSettings (const std::string &filepath)
 Loader settings functions.
virtual void saveLoaderSettings (const std::string &filepath)
 Loader settings functions.
virtual void loadDefaultLoaderSettings (bool useOnlyFactorySettings)
 Loader settings functions.
virtual void saveDefaultLoaderSettings ()
 Loader settings functions.
virtual void updateLoaderState ()
 Loader settings functions.
virtual void setAccelerationCachingEnabled (bool enabled)
 \ Cache Settings functions
virtual bool accelerationCachingEnabled () const
 Get whether accelerated file caching is enabled.
virtual void clearAccelerationCache () const
 Clears the accelerated cache on disk.
virtual void setInstancingEnabled (bool enabled)
 Set whether file instancing is enabled.
virtual void setClearInstancesOnNewSceneEnabled (bool enabled)
 Set whether to clear the instances on a new scene.
virtual bool instancingEnabled () const
 Get whether file instancing is enabled.
virtual bool clearInstancesOnNewScene () const
 Get whether file instancing is enabled.
virtual void clearInstancingCache ()
 Clears the runtime file instance cache.
virtual void setCompressTextures (bool enabled)
 Set whether texture compression is enabled.
virtual bool compressTextures () const
 Get whether texture compression is enabled.
virtual void loadCacheSettings (const std::string &filepath)
 \ Cache Settings functions
virtual void saveCacheSettings (const std::string &filepath)
 \ Cache Settings functions
virtual void loadDefaultCacheSettings (bool useOnlyFactorySettings)
 \ Cache Settings functions
virtual void saveDefaultCacheSettings ()
 \ Cache Settings functions
virtual void updateCacheState ()
 \ Cache Settings functions
Slave synchronization methods
virtual void synchronizeSlave (DtDeRecord *igRecord)
 Synchronize a slave with a master.

Public Attributes

Signals
boost::signal< void(const
std::string &, const
std::string &)> 
signal_coordinateSystemChanged
 Emitted when the coordinate system changes.

Protected Member Functions

 DtDeSharedState (DtDe &DtDe)
 Protected CTOR for creator pattern.
virtual void sendModelDefinitionsToSlave (DtMessageClient *messageClient)
 Sends master's DtModelDefinitions to the slave.
virtual void sendModelSetConfigurationToSlave (DtMessageClient *messageClient)
 Push model set configuration down to connected IGs - calls setModeUsesModelSet and setCurrentModelSet.
virtual void local_setModelInstancingEnabled (bool)
 Set if model instance sharing is enabled.
virtual void local_clearModelInstancingCache ()
 Clears the cache of all model definitions.
virtual void local_setWireframeMode (bool mode)
 sets the wireframe mode
virtual void local_setTerrainScalingEnabled (bool enabled)
 Set the terrain scale state.
virtual void local_setTerrainScaleFactor (double scaleFactor)
 Set the terrain scale factor.
virtual void local_setClearTrackHistoryOnTerrainScaleChanged (bool clear)
 Sets whether terrain scaling causes track history clearing.
virtual void local_setPlanViewGeocentricOccludedTransparency (float alpha)
 sets the wireframe mode
virtual void local_setShadowState (bool mode, int qual, bool entity, bool prop, bool terrain)
 sets the shadow state
virtual void local_ddsFlipState (bool flip)
 sets the dds flip state
virtual void local_setVisualizeModelSet (int modelSet, bool visualize)
 indicate whether or not a model set is visualized
void local_setCoordinateSystem (const std::string &coordinateSystemName, const std::string &coordinateSystemParameters)
 Internal setting the coordinate system.
Local model definition methods. Called by friend DtDeSharedStateProctor.
virtual void local_setModelDefinitionManager (const DtModelDefinitionManager &definition)
 Sets the model definition manager in the local DtDe.
virtual void local_addModelDefinition (const DtModelDefinition &definition)
 Adds a model definition to the local DtDe.
virtual void local_destroyModelDefinition (const std::string &definition)
 Adds a model definition to the local DtDe. .
Local cache functions.
void local_setDateAndTime (int year, DtDeTimeManager::Month month, int dayOfMonth, int hour, int minutes, double seconds)
void local_setTimeScale (double timeScale)
Local time functions.
virtual void local_setAccelerationCachingEnabled (bool enabled)
 Set whether accelerated file caching is enabled.
virtual void local_clearAccelerationCache ()
 Clears the accelerated cache on disk.
virtual void local_setInstancingEnabled (bool enabled)
 Set whether file instancing is enabled.
virtual void local_setClearInstancesOnNewScene (bool enabled)
 Set whether clearing instances on new scenes is enabled.
virtual void local_clearInstancingCache ()
 Clears the runtime file instance cache.
virtual void local_setCompressTextures (bool enabled)
 Set whether texture compression is enabled.

Protected Attributes

DtDemyDe
DtDeSharedStateProctormyIgSharedStateProctor
DtModelDefinitionManagermyModelDefinitionManager
DtModelSetRealizationManagermyModelSetRealizationManager
DtCoordinateSystemmyCoordinateSystem
DtDeTimeManager myTimeManager
bool myWireframeMode
bool myTerrainScalingEnabled
double myTerrainScaleFactor
bool myClearTrackHistoryOnTerrainScaleChanged
float myPlanViewGeocentricOccludedTransparency
bool myShadowMode
int myShadowQuality
bool myEntityShadowMode
bool myPropShadowMode
bool myTerrainShadowMode
bool myAutoSave

Friends

class DtDeSharedStateCreator
 Specify the creator class as a friend to access protected CTOR.
class DtDeSharedStateProctor
 Specify the DtDeSharedStateProctor class as a friend to access protected "local_" methods.

Detailed Description

The DtDeSharedState represents all the data that is shared between the master and its slaves.

The DtDeSharedState object will own the data objects that need distributing (like mappers). These will be protected members of the class. The DtDeSharedState will be a member of DtDe. There will be const accessors for these objects themselves (and slaves can get the current data from those accessors without being able to change it). The DtDeSharedState object will have non-const mutators for it's members. These serialize the function calls into messages and distribute them among slaves. This makes it impossible for users to do bad things like get the local model definition manager and add model definitions without distributing them to slaves.


Constructor & Destructor Documentation

DTOR.

Protected CTOR for creator pattern.


Member Function Documentation

virtual void makVrv::DtDeSharedState::initialize ( ) [virtual]

Called during DtDe::initialize().

Reimplemented in DtVrfSharedState.

DtModelDefinitionManager accessor.

Exceptions:
DtCorruptedStateif called before the DtDe is initialized.

DtModelDefinitionManager accessor.

Exceptions:
DtCorruptedStateif called before the DtDe is initialized.

DtModelSetRealizationManager accessor.

Exceptions:
DtCorruptedStateif called before the DtDe is initialized.
virtual void makVrv::DtDeSharedState::setVisualizeModelSet ( int  modelset,
bool  visualize 
) [virtual]

Indicate that a model set should be visualized.

This will automatically be distributed to connected IGs

virtual void makVrv::DtDeSharedState::addModelDefinition ( const DtModelDefinition definition) [virtual]

Adds a model definition to the DtDe.

This will automatically distribute all model definitions to connected IGs.

virtual void makVrv::DtDeSharedState::setModelDefinitionManager ( const DtModelDefinitionManager definition) [virtual]

Sets model definition manager in the DtDe.

This will automatically distribute all model definitions to connected IGs.

virtual void makVrv::DtDeSharedState::renameModelDefinition ( const DtModelDefinition old,
const DtModelDefinition newDef 
) [virtual]

Renames model definition to the DtDe.

This will automatically distribute all model definitions to connected IGs. Will also signal the rename. The old definition will be removed (deleted)

virtual void makVrv::DtDeSharedState::destroyModelDefinition ( const DtModelDefinition definition) [virtual]

Destroys a model definition from the DtDe.

This will automatically distribute all model definitions to connected IGs.

Set if model instance sharing is enabled.

Clears the cache of all model definitions.

virtual void makVrv::DtDeSharedState::setCoordinateSystem ( const std::string &  coordinateSystemName,
const std::string &  coordinateSystemParameters 
) [virtual]

Set the coordinate system.

Get the coordinate system.

Set the coordinate system.

virtual void makVrv::DtDeSharedState::setDateAndTime ( int  year,
DtDeTimeManager::Month  month,
int  dayOfMonth,
int  hour,
int  minutes,
double  seconds 
) [virtual]

Set the current date and time of the scene.

This will effect any rendering which is dependent on the date (for example location of Sun & Moon).

Parameters:
Input
yearis only valid for the Gregorian calender (1582 onward)
monthis the month of the year (1-12).
dayOfMonthis the day of the month (1-[28 | 30 |31]) depending on the month.
hourthe hour of the day 0-23
minutesof the day 0-59 param seconds 0.0-59.99~
Warning:
Frequently setting this may have a negative effect on performance depending on the cost to modify the scene to reflect the new date.
virtual void makVrv::DtDeSharedState::setTimeScale ( double  timeScale) [virtual]

Set the current time scale relative to simulation time.

This will also change the 'set time' based upon the current scaling value.

Access the constant time manager for getting the date and time.

virtual void makVrv::DtDeSharedState::setWireframeMode ( bool  state) [virtual]

state functions

wireframe state functions

virtual bool makVrv::DtDeSharedState::wireframeMode ( ) const [virtual]

state functions

wireframe state functions

terrain scaling state functions

virtual void makVrv::DtDeSharedState::setTerrainScalingEnabled ( bool  enabled) [virtual]

state functions

wireframe state functions

virtual double makVrv::DtDeSharedState::terrainScaleFactor ( ) const [virtual]

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::setTerrainScaleFactor ( double  scaleFactor) [virtual]

state functions

wireframe state functions

state functions

wireframe state functions

state functions

wireframe state functions

occluded transparency state functions

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::setPerformanceOverlayOn ( bool  enabled) [virtual]

state functions

wireframe state functions

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::setShadowState ( bool  shadowMode,
int  shadowQuality,
bool  entityMode,
bool  propMode,
bool  terrainMode 
) [virtual]

shadow state functions

virtual bool makVrv::DtDeSharedState::shadowMode ( ) const [virtual]

state functions

wireframe state functions

virtual int makVrv::DtDeSharedState::shadowQuality ( ) const [virtual]

state functions

wireframe state functions

virtual bool makVrv::DtDeSharedState::entityShadowMode ( ) const [virtual]

state functions

wireframe state functions

virtual bool makVrv::DtDeSharedState::propShadowMode ( ) const [virtual]

state functions

wireframe state functions

virtual bool makVrv::DtDeSharedState::terrainShadowMode ( ) const [virtual]

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::loadRenderSettings ( const std::string &  filepath) [virtual]

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::saveRenderSettings ( const std::string &  filepath) [virtual]

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::loadDefaultRenderSettings ( bool  useOnlyFactorySettings) [virtual]

state functions

wireframe state functions

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::updateRenderState ( ) [virtual]

state functions

wireframe state functions

virtual void makVrv::DtDeSharedState::setDdsFlip ( bool  state) [virtual]

Loader settings functions.

Set the global DDS flip option

virtual bool makVrv::DtDeSharedState::ddsFlip ( ) const [virtual]

Get the global DDS flip option.

virtual void makVrv::DtDeSharedState::loadLoaderSettings ( const std::string &  filepath) [virtual]

Loader settings functions.

Set the global DDS flip option

virtual void makVrv::DtDeSharedState::saveLoaderSettings ( const std::string &  filepath) [virtual]

Loader settings functions.

Set the global DDS flip option

virtual void makVrv::DtDeSharedState::loadDefaultLoaderSettings ( bool  useOnlyFactorySettings) [virtual]

Loader settings functions.

Set the global DDS flip option

Loader settings functions.

Set the global DDS flip option

virtual void makVrv::DtDeSharedState::updateLoaderState ( ) [virtual]

Loader settings functions.

Set the global DDS flip option

virtual void makVrv::DtDeSharedState::setAccelerationCachingEnabled ( bool  enabled) [virtual]

\ Cache Settings functions

Set whether accelerated file caching is enabled.

Get whether accelerated file caching is enabled.

virtual void makVrv::DtDeSharedState::clearAccelerationCache ( ) const [virtual]

Clears the accelerated cache on disk.

virtual void makVrv::DtDeSharedState::setInstancingEnabled ( bool  enabled) [virtual]

Set whether file instancing is enabled.

Set whether to clear the instances on a new scene.

virtual bool makVrv::DtDeSharedState::instancingEnabled ( ) const [virtual]

Get whether file instancing is enabled.

Get whether file instancing is enabled.

Clears the runtime file instance cache.

virtual void makVrv::DtDeSharedState::setCompressTextures ( bool  enabled) [virtual]

Set whether texture compression is enabled.

virtual bool makVrv::DtDeSharedState::compressTextures ( ) const [virtual]

Get whether texture compression is enabled.

virtual void makVrv::DtDeSharedState::loadCacheSettings ( const std::string &  filepath) [virtual]

\ Cache Settings functions

Set whether accelerated file caching is enabled.

virtual void makVrv::DtDeSharedState::saveCacheSettings ( const std::string &  filepath) [virtual]

\ Cache Settings functions

Set whether accelerated file caching is enabled.

virtual void makVrv::DtDeSharedState::loadDefaultCacheSettings ( bool  useOnlyFactorySettings) [virtual]

\ Cache Settings functions

Set whether accelerated file caching is enabled.

\ Cache Settings functions

Set whether accelerated file caching is enabled.

virtual void makVrv::DtDeSharedState::updateCacheState ( ) [virtual]

\ Cache Settings functions

Set whether accelerated file caching is enabled.

Initializes the shared change state manager with change state objects that are currently part of the system.

virtual void makVrv::DtDeSharedState::synchronizeSlave ( DtDeRecord igRecord) [virtual]

Synchronize a slave with a master.

Synchronizes DtModelDefinitions and coordinate systems.

virtual void makVrv::DtDeSharedState::sendModelDefinitionsToSlave ( DtMessageClient messageClient) [protected, virtual]

Sends master's DtModelDefinitions to the slave.

virtual void makVrv::DtDeSharedState::sendModelSetConfigurationToSlave ( DtMessageClient messageClient) [protected, virtual]

Push model set configuration down to connected IGs - calls setModeUsesModelSet and setCurrentModelSet.

virtual void makVrv::DtDeSharedState::local_setModelDefinitionManager ( const DtModelDefinitionManager definition) [protected, virtual]

Sets the model definition manager in the local DtDe.

virtual void makVrv::DtDeSharedState::local_addModelDefinition ( const DtModelDefinition definition) [protected, virtual]

Adds a model definition to the local DtDe.

virtual void makVrv::DtDeSharedState::local_destroyModelDefinition ( const std::string &  definition) [protected, virtual]

Adds a model definition to the local DtDe. .

virtual void makVrv::DtDeSharedState::local_setModelInstancingEnabled ( bool  ) [protected, virtual]

Set if model instance sharing is enabled.

virtual void makVrv::DtDeSharedState::local_clearModelInstancingCache ( ) [protected, virtual]

Clears the cache of all model definitions.

virtual void makVrv::DtDeSharedState::local_setWireframeMode ( bool  mode) [protected, virtual]

sets the wireframe mode

virtual void makVrv::DtDeSharedState::local_setTerrainScalingEnabled ( bool  enabled) [protected, virtual]

Set the terrain scale state.

virtual void makVrv::DtDeSharedState::local_setTerrainScaleFactor ( double  scaleFactor) [protected, virtual]

Set the terrain scale factor.

Sets whether terrain scaling causes track history clearing.

virtual void makVrv::DtDeSharedState::local_setPlanViewGeocentricOccludedTransparency ( float  alpha) [protected, virtual]

sets the wireframe mode

virtual void makVrv::DtDeSharedState::local_setShadowState ( bool  mode,
int  qual,
bool  entity,
bool  prop,
bool  terrain 
) [protected, virtual]

sets the shadow state

virtual void makVrv::DtDeSharedState::local_ddsFlipState ( bool  flip) [protected, virtual]

sets the dds flip state

virtual void makVrv::DtDeSharedState::local_setVisualizeModelSet ( int  modelSet,
bool  visualize 
) [protected, virtual]

indicate whether or not a model set is visualized

void makVrv::DtDeSharedState::local_setCoordinateSystem ( const std::string &  coordinateSystemName,
const std::string &  coordinateSystemParameters 
) [protected]

Internal setting the coordinate system.

void makVrv::DtDeSharedState::local_setDateAndTime ( int  year,
DtDeTimeManager::Month  month,
int  dayOfMonth,
int  hour,
int  minutes,
double  seconds 
) [protected]
void makVrv::DtDeSharedState::local_setTimeScale ( double  timeScale) [protected]
virtual void makVrv::DtDeSharedState::local_setAccelerationCachingEnabled ( bool  enabled) [protected, virtual]

Set whether accelerated file caching is enabled.

virtual void makVrv::DtDeSharedState::local_clearAccelerationCache ( ) [protected, virtual]

Clears the accelerated cache on disk.

virtual void makVrv::DtDeSharedState::local_setInstancingEnabled ( bool  enabled) [protected, virtual]

Set whether file instancing is enabled.

virtual void makVrv::DtDeSharedState::local_setClearInstancesOnNewScene ( bool  enabled) [protected, virtual]

Set whether clearing instances on new scenes is enabled.

virtual void makVrv::DtDeSharedState::local_clearInstancingCache ( ) [protected, virtual]

Clears the runtime file instance cache.

virtual void makVrv::DtDeSharedState::local_setCompressTextures ( bool  enabled) [protected, virtual]

Set whether texture compression is enabled.


Friends And Related Function Documentation

friend class DtDeSharedStateCreator [friend]

Specify the creator class as a friend to access protected CTOR.

friend class DtDeSharedStateProctor [friend]

Specify the DtDeSharedStateProctor class as a friend to access protected "local_" methods.


Member Data Documentation

boost::signal<void (const std::string&,const std::string&)> makVrv::DtDeSharedState::signal_coordinateSystemChanged

Emitted when the coordinate system changes.

Signal with a coordinate System name and its parameters.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)