VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtEarthLayerVisibilityManager Class Reference

Manages show/hide of image or model layers by stealth view mode. More...

Inheritance diagram for makVrf::DtEarthLayerVisibilityManager:
Inheritance graph
[legend]

Public Member Functions

 DtEarthLayerVisibilityManager (makVrv::DtDe &)
 CTOR. More...
 
virtual ~DtEarthLayerVisibilityManager ()
 DTOR. More...
 
virtual void setImageLayerVisibleForMode (int layer, bool visible, int mode=-1)
 Set image layer visible/hidden for the particular mode. Mode of -1 sets visible/hidden for all modes. More...
 
virtual void setImageLayerVisibleForMode (const std::string &layerName, bool visible, int mode=-1)
 
virtual void setModelLayerVisibleForMode (int layer, bool visible, int mode=-1)
 Set model layer visible/hidden for the particular mode. Mode of -1 sets visible/hidden for all modes. More...
 
virtual void setModelLayerVisibleForMode (const std::string &layerName, bool visible, int mode=-1)
 
virtual std::vector< boolimageLayerEnabledStates (int layer) const
 Gets all enabled states for the particular image layer. More...
 
virtual std::vector< boolimageLayerEnabledStates (const std::string &imageLayerName) const
 
virtual bool imageLayerEnabledState (int layer, int mode) const
 Gets the enabled state for the particular mode for the specified image layer. More...
 
virtual bool imageLayerEnabledState (const std::string &imageLayerName, int mode) const
 
virtual std::vector< boolmodelLayerEnabledStates (int layer) const
 Gets all enabled states for the particular model layer. More...
 
virtual std::vector< boolmodelLayerEnabledStates (const std::string &modelLayerName) const
 
virtual bool modelLayerEnabledState (int layer, int mode) const
 Gets the enabled state for the particular mode for the specified model layer. More...
 
virtual bool modelLayerEnabledState (const std::string &modelLayerName, int mode) const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static
DtEarthLayerVisibilityManager
instance (makVrv::DtDe &de)
 Returns DtEarthLayerVisibilityManager of the manager. More...
 
static void registerInstance (makVrv::DtDe &, DtEarthLayerVisibilityManager *)
 Register a new manager instance. More...
 

Protected Types

typedef std::vector
< osg::ref_ptr
< osgEarth::ImageLayer > > 
ImageLayerVector
 
typedef std::vector
< osg::ref_ptr
< osgEarth::FeatureModelLayer > > 
FeatureModelLayerVector
 

Protected Member Functions

virtual std::string imageLayerName (int) const
 For the given layer, return the internal image layer name. More...
 
virtual int indexOfImageLayer (const std::string &) const
 
virtual std::string modelLayerName (int) const
 For the given layer, return the internal model layer name. More...
 
virtual int indexOfModelLayer (const std::string &) const
 
virtual std::string nameFromLayer (const std::string &) const
 Returns the name from the given layer. Strips off internal name. More...
 
virtual void setLayerVisibilityState (const std::string &name, bool visible, bool curVisible, int mode) const
 Sets the layer visibility state in the terrain record only. More...
 
virtual void setup ()
 Find osgEarth map node. More...
 
virtual void slot_terrainCleared ()
 Called when the terrain is closed. More...
 
virtual std::vector< boolvisibilityStates (const std::string &layerName) const
 
virtual bool visibilityState (const std::string &layerName, int mode) const
 
virtual void onCurrentObserverChanged (makVrv::DtInputDriver *, makVrv::DtObserver *)
 
virtual void onObserverAboutToBeDestroyed (makVrv::DtInputDriver *, makVrv::DtObserver *)
 
virtual void onObserverModeChanged (makVrv::DtObserver *, int mode)
 
virtual void setCurrentObserver (makVrv::DtObserver *)
 
virtual void setupLayersBasedOnCurrentObserver ()
 

Protected Attributes

makVrv::DtDemyDe
 
makVrv::DtSignalConnectionManager mySignals
 
osgEarth::MapNode * myMapNode
 
makVrv::DtObservermyCurrentObserver
 
ImageLayerVector myImageLayers
 
FeatureModelLayerVector myFeatureModelLayers
 

Detailed Description

Manages show/hide of image or model layers by stealth view mode.

Will change the optional data in the terrain record such that when the terrain is saved the current layer show/hide state is preserved

Member Typedef Documentation

typedef std::vector<osg::ref_ptr<osgEarth::ImageLayer> > makVrf::DtEarthLayerVisibilityManager::ImageLayerVector
protected
typedef std::vector<osg::ref_ptr<osgEarth::FeatureModelLayer> > makVrf::DtEarthLayerVisibilityManager::FeatureModelLayerVector
protected

Constructor & Destructor Documentation

makVrf::DtEarthLayerVisibilityManager::DtEarthLayerVisibilityManager ( makVrv::DtDe )

CTOR.

virtual makVrf::DtEarthLayerVisibilityManager::~DtEarthLayerVisibilityManager ( )
virtual

DTOR.

Member Function Documentation

static DtEarthLayerVisibilityManager& makVrf::DtEarthLayerVisibilityManager::instance ( makVrv::DtDe de)
static

Returns DtEarthLayerVisibilityManager of the manager.

static void makVrf::DtEarthLayerVisibilityManager::registerInstance ( makVrv::DtDe ,
DtEarthLayerVisibilityManager  
)
static

Register a new manager instance.

virtual void makVrf::DtEarthLayerVisibilityManager::setImageLayerVisibleForMode ( int  layer,
bool  visible,
int  mode = -1 
)
virtual

Set image layer visible/hidden for the particular mode. Mode of -1 sets visible/hidden for all modes.

virtual void makVrf::DtEarthLayerVisibilityManager::setImageLayerVisibleForMode ( const std::string &  layerName,
bool  visible,
int  mode = -1 
)
virtual
virtual void makVrf::DtEarthLayerVisibilityManager::setModelLayerVisibleForMode ( int  layer,
bool  visible,
int  mode = -1 
)
virtual

Set model layer visible/hidden for the particular mode. Mode of -1 sets visible/hidden for all modes.

virtual void makVrf::DtEarthLayerVisibilityManager::setModelLayerVisibleForMode ( const std::string &  layerName,
bool  visible,
int  mode = -1 
)
virtual
virtual std::vector<bool> makVrf::DtEarthLayerVisibilityManager::imageLayerEnabledStates ( int  layer) const
virtual

Gets all enabled states for the particular image layer.

virtual std::vector<bool> makVrf::DtEarthLayerVisibilityManager::imageLayerEnabledStates ( const std::string &  imageLayerName) const
virtual
virtual bool makVrf::DtEarthLayerVisibilityManager::imageLayerEnabledState ( int  layer,
int  mode 
) const
virtual

Gets the enabled state for the particular mode for the specified image layer.

virtual bool makVrf::DtEarthLayerVisibilityManager::imageLayerEnabledState ( const std::string &  imageLayerName,
int  mode 
) const
virtual
virtual std::vector<bool> makVrf::DtEarthLayerVisibilityManager::modelLayerEnabledStates ( int  layer) const
virtual

Gets all enabled states for the particular model layer.

virtual std::vector<bool> makVrf::DtEarthLayerVisibilityManager::modelLayerEnabledStates ( const std::string &  modelLayerName) const
virtual
virtual bool makVrf::DtEarthLayerVisibilityManager::modelLayerEnabledState ( int  layer,
int  mode 
) const
virtual

Gets the enabled state for the particular mode for the specified model layer.

virtual bool makVrf::DtEarthLayerVisibilityManager::modelLayerEnabledState ( const std::string &  modelLayerName,
int  mode 
) const
virtual
virtual std::string makVrf::DtEarthLayerVisibilityManager::imageLayerName ( int  ) const
protectedvirtual

For the given layer, return the internal image layer name.

virtual int makVrf::DtEarthLayerVisibilityManager::indexOfImageLayer ( const std::string &  ) const
protectedvirtual
virtual std::string makVrf::DtEarthLayerVisibilityManager::modelLayerName ( int  ) const
protectedvirtual

For the given layer, return the internal model layer name.

virtual int makVrf::DtEarthLayerVisibilityManager::indexOfModelLayer ( const std::string &  ) const
protectedvirtual
virtual std::string makVrf::DtEarthLayerVisibilityManager::nameFromLayer ( const std::string &  ) const
protectedvirtual

Returns the name from the given layer. Strips off internal name.

virtual void makVrf::DtEarthLayerVisibilityManager::setLayerVisibilityState ( const std::string &  name,
bool  visible,
bool  curVisible,
int  mode 
) const
protectedvirtual

Sets the layer visibility state in the terrain record only.

If record does not exist fills with default visibility state

virtual void makVrf::DtEarthLayerVisibilityManager::setup ( )
protectedvirtual

Find osgEarth map node.

virtual void makVrf::DtEarthLayerVisibilityManager::slot_terrainCleared ( )
protectedvirtual

Called when the terrain is closed.

virtual std::vector<bool> makVrf::DtEarthLayerVisibilityManager::visibilityStates ( const std::string &  layerName) const
protectedvirtual
virtual bool makVrf::DtEarthLayerVisibilityManager::visibilityState ( const std::string &  layerName,
int  mode 
) const
protectedvirtual
virtual void makVrf::DtEarthLayerVisibilityManager::onCurrentObserverChanged ( makVrv::DtInputDriver ,
makVrv::DtObserver  
)
protectedvirtual
virtual void makVrf::DtEarthLayerVisibilityManager::onObserverAboutToBeDestroyed ( makVrv::DtInputDriver ,
makVrv::DtObserver  
)
protectedvirtual
virtual void makVrf::DtEarthLayerVisibilityManager::onObserverModeChanged ( makVrv::DtObserver ,
int  mode 
)
protectedvirtual
virtual void makVrf::DtEarthLayerVisibilityManager::setCurrentObserver ( makVrv::DtObserver )
protectedvirtual
virtual void makVrf::DtEarthLayerVisibilityManager::setupLayersBasedOnCurrentObserver ( )
protectedvirtual

Member Data Documentation

makVrv::DtDe& makVrf::DtEarthLayerVisibilityManager::myDe
protected
makVrv::DtSignalConnectionManager makVrf::DtEarthLayerVisibilityManager::mySignals
protected
osgEarth::MapNode* makVrf::DtEarthLayerVisibilityManager::myMapNode
mutableprotected
makVrv::DtObserver* makVrf::DtEarthLayerVisibilityManager::myCurrentObserver
protected
ImageLayerVector makVrf::DtEarthLayerVisibilityManager::myImageLayers
protected
FeatureModelLayerVector makVrf::DtEarthLayerVisibilityManager::myFeatureModelLayers
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)