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 Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtNavigationFeatureManager Class Reference

The DtNavigationFeatureManager matches streamed features to other streamed features (buoys and beacons) that have the same location. More...

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

Public Types

typedef std::map< DtUniqueID,
DtNavigationFeature * > 
FeatureMap
 Type for a map of controller IDs to DtNavigationFeature. More...
 

Public Member Functions

 DtNavigationFeatureManager (const std::string &name, DtDe &de, DtAgentManagerInterface &sceneInterface, DtBuoyBeaconLayer &buoyBeaconLayer, DtBuoyBeaconLayer::AttachableTypes attType, const std::string &featureLayerList, const std::string &featureAttrMapFilename, DtNavigationFeatureBuilder *featureBuilder, int presenceSwitchNum, int typeSwitchNum)
 CTOR. More...
 
virtual ~DtNavigationFeatureManager ()
 DTOR. More...
 
bool readFeatureStyleListFile (const std::string &path, const std::string &layerListFileName)
 Read the file that specifies the list of osgEarth style names that we wish to have our registered builder called for when features are streamed in. More...
 
virtual void addFeature (DtNavigationFeature *feature)
 Add a feature (ex. More...
 
DtNavigationFeaturefindFeature (DtUniqueID elementId)
 Finds a pointer to the feature controller with the given element id. More...
 
virtual bool destroyFeature (DtUniqueID id)
 Destroys the feature with the element id. More...
 
virtual DtUniqueID findFeatureWithPosition (const DtVector &position)
 Look through the list of unattached features for a feature with the specified position. More...
 
const FeatureMapfeatures () const
 Get the container of features associated held by the manager. More...
 
FeatureMapfeatures ()
 

Protected Types

typedef std::list< std::string > FeatureStylesList
 
typedef boost::unordered_map
< DtUniqueID, DtVector
PendingFeatureAttachmentMap
 Type for hash table of feature ids and locations. More...
 
typedef boost::unordered_map
< DtUniqueID, DtUniqueID
FeatureToFeatureMap
 Type for hash tables of features to attached buoys and attached buoys to features. More...
 

Protected Member Functions

 DtNavigationFeatureManager ()
 CTOR (unimplemented default CTOR ) More...
 
 DtNavigationFeatureManager (const DtNavigationFeatureManager &orig)
 Copy CTOR (unimplemented) More...
 
DtNavigationFeatureManageroperator= (const DtNavigationFeatureManager &rhs)
 Assignment operator (unimplemented) More...
 
virtual void setPresenceSwitchNumber (int switchNum)
 
virtual int presenceSwitchNumber () const
 
virtual void setTypeSwitchNumber (int typeNum)
 
virtual int typeSwitchNumber () const
 
virtual void attachToBuoyOrBeacon (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoyOrBeacon)
 Helper function for setting up a buoy/beacon attachment. More...
 
virtual void detachFromBuoyOrBeacon (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoy)
 Helper function for detaching from a buoy/beacon. More...
 
virtual void moveFeatureToDetachedFeatureList (DtUniqueID controllerId)
 Move features from the list of attached features to the list of unattached features. More...
 
virtual void moveFeatureToAttachedFeatureList (DtUniqueID controllerId)
 Move features from the list of unattached features to the list of attached features. More...
 
virtual void initializeFeatureCreators ()
 Register creators with the streamed feature manager for each feature layer (osgEarth model style) of interest. More...
 
virtual void slot_featureToBeDeleted (const std::string &myLayerName, DtUniqueID featureId)
 Slot connected to signal from the streamed feature manager that a feature has paged out. More...
 
virtual void slot_buoyOrBeaconCreated (DtBuoyOrBeaconFacade &buoy, const DtVector &initialPosition)
 Slot connected to signal from the streamed feature manager that a buoy has paged in. More...
 
virtual void slot_buoyOrBeaconAboutToBeDestroyed (const DtBuoyOrBeaconFacade &buoy)
 Slot connected to signal from the streamed feature manager that a buoy has paged out. More...
 
void slot_sceneCreated ()
 If the IG is initialized when this is called, it will call initializeFeatureCreators. More...
 
void slot_postInitialize ()
 slot used to wait for postInitialized signal More...
 

Protected Attributes

DtDemyDe
 
DtAgentManagerInterfacemySceneInterface
 
FeatureMap myFeatures
 
DtSignalConnectionManager myConnections
 
std::string myName
 
DtBuoyBeaconLayer::AttachableTypes myAttachableType
 
std::string myFeatureLayerList
 
std::string myFeatureAttrMapFilename
 
DtNavigationFeatureBuildermyNavigationFeatureBuilder
 
int myPresenceSwitchNumber
 
int myTypeSwitchNumber
 
FeatureStylesList myFeatureStylesList
 The list of osgEarth model styles we want to be notified about. More...
 
PendingFeatureAttachmentMap myDetachedFeatures
 Features start here. When attached they move to... More...
 
PendingFeatureAttachmentMap myAttachedFeatures
 ...here. More...
 
FeatureToFeatureMap myFeatureToBuoyOrBeaconMap
 
FeatureToFeatureMap myBuoyOrBeaconToFeatureMap
 
DtBuoyBeaconLayermyBuoyBeaconLayer
 Access to the buoys. More...
 
boost::signalslib::connection myPostInitializeConnection
 

Detailed Description

The DtNavigationFeatureManager matches streamed features to other streamed features (buoys and beacons) that have the same location.

It is also responsible for removing them when the streamed features page out

Member Typedef Documentation

Type for a map of controller IDs to DtNavigationFeature.

typedef std::list<std::string> makVrv::DtNavigationFeatureManager::FeatureStylesList
protected

Type for hash table of feature ids and locations.

Type for hash tables of features to attached buoys and attached buoys to features.

Constructor & Destructor Documentation

makVrv::DtNavigationFeatureManager::DtNavigationFeatureManager ( const std::string &  name,
DtDe de,
DtAgentManagerInterface sceneInterface,
DtBuoyBeaconLayer buoyBeaconLayer,
DtBuoyBeaconLayer::AttachableTypes  attType,
const std::string &  featureLayerList,
const std::string &  featureAttrMapFilename,
DtNavigationFeatureBuilder featureBuilder,
int  presenceSwitchNum,
int  typeSwitchNum 
)

CTOR.

virtual makVrv::DtNavigationFeatureManager::~DtNavigationFeatureManager ( )
virtual

DTOR.

makVrv::DtNavigationFeatureManager::DtNavigationFeatureManager ( )
protected

CTOR (unimplemented default CTOR )

makVrv::DtNavigationFeatureManager::DtNavigationFeatureManager ( const DtNavigationFeatureManager orig)
protected

Copy CTOR (unimplemented)

Member Function Documentation

bool makVrv::DtNavigationFeatureManager::readFeatureStyleListFile ( const std::string &  path,
const std::string &  layerListFileName 
)

Read the file that specifies the list of osgEarth style names that we wish to have our registered builder called for when features are streamed in.

virtual void makVrv::DtNavigationFeatureManager::addFeature ( DtNavigationFeature feature)
virtual

Add a feature (ex.

light, daymark). The manager takes ownership of the controller

DtNavigationFeature* makVrv::DtNavigationFeatureManager::findFeature ( DtUniqueID  elementId)

Finds a pointer to the feature controller with the given element id.

virtual bool makVrv::DtNavigationFeatureManager::destroyFeature ( DtUniqueID  id)
virtual

Destroys the feature with the element id.

Returns true if the feature was destroyed, false otherwise.

const FeatureMap& makVrv::DtNavigationFeatureManager::features ( ) const

Get the container of features associated held by the manager.

FeatureMap& makVrv::DtNavigationFeatureManager::features ( )
virtual DtUniqueID makVrv::DtNavigationFeatureManager::findFeatureWithPosition ( const DtVector position)
virtual

Look through the list of unattached features for a feature with the specified position.

DtNavigationFeatureManager& makVrv::DtNavigationFeatureManager::operator= ( const DtNavigationFeatureManager rhs)
protected

Assignment operator (unimplemented)

virtual void makVrv::DtNavigationFeatureManager::setPresenceSwitchNumber ( int  switchNum)
protectedvirtual
virtual int makVrv::DtNavigationFeatureManager::presenceSwitchNumber ( ) const
protectedvirtual
virtual void makVrv::DtNavigationFeatureManager::setTypeSwitchNumber ( int  typeNum)
protectedvirtual
virtual int makVrv::DtNavigationFeatureManager::typeSwitchNumber ( ) const
protectedvirtual
virtual void makVrv::DtNavigationFeatureManager::attachToBuoyOrBeacon ( DtNavigationFeature controller,
DtBuoyOrBeaconFacade buoyOrBeacon 
)
protectedvirtual

Helper function for setting up a buoy/beacon attachment.

Reimplemented in makVrv::DtNavigationLightManager.

virtual void makVrv::DtNavigationFeatureManager::detachFromBuoyOrBeacon ( DtNavigationFeature controller,
DtBuoyOrBeaconFacade buoy 
)
protectedvirtual

Helper function for detaching from a buoy/beacon.

Reimplemented in makVrv::DtNavigationLightManager.

virtual void makVrv::DtNavigationFeatureManager::moveFeatureToDetachedFeatureList ( DtUniqueID  controllerId)
protectedvirtual

Move features from the list of attached features to the list of unattached features.

virtual void makVrv::DtNavigationFeatureManager::moveFeatureToAttachedFeatureList ( DtUniqueID  controllerId)
protectedvirtual

Move features from the list of unattached features to the list of attached features.

virtual void makVrv::DtNavigationFeatureManager::initializeFeatureCreators ( )
protectedvirtual

Register creators with the streamed feature manager for each feature layer (osgEarth model style) of interest.

virtual void makVrv::DtNavigationFeatureManager::slot_featureToBeDeleted ( const std::string &  myLayerName,
DtUniqueID  featureId 
)
protectedvirtual

Slot connected to signal from the streamed feature manager that a feature has paged out.

virtual void makVrv::DtNavigationFeatureManager::slot_buoyOrBeaconCreated ( DtBuoyOrBeaconFacade buoy,
const DtVector initialPosition 
)
protectedvirtual

Slot connected to signal from the streamed feature manager that a buoy has paged in.

virtual void makVrv::DtNavigationFeatureManager::slot_buoyOrBeaconAboutToBeDestroyed ( const DtBuoyOrBeaconFacade buoy)
protectedvirtual

Slot connected to signal from the streamed feature manager that a buoy has paged out.

void makVrv::DtNavigationFeatureManager::slot_sceneCreated ( )
protected

If the IG is initialized when this is called, it will call initializeFeatureCreators.

Otherwise, it connects to the postInitialize signal, which will then call initializeFeatureCreators.

void makVrv::DtNavigationFeatureManager::slot_postInitialize ( )
protected

slot used to wait for postInitialized signal

Member Data Documentation

DtDe& makVrv::DtNavigationFeatureManager::myDe
protected
DtAgentManagerInterface& makVrv::DtNavigationFeatureManager::mySceneInterface
protected
FeatureMap makVrv::DtNavigationFeatureManager::myFeatures
protected
DtSignalConnectionManager makVrv::DtNavigationFeatureManager::myConnections
protected
std::string makVrv::DtNavigationFeatureManager::myName
protected
DtBuoyBeaconLayer::AttachableTypes makVrv::DtNavigationFeatureManager::myAttachableType
protected
std::string makVrv::DtNavigationFeatureManager::myFeatureLayerList
protected
std::string makVrv::DtNavigationFeatureManager::myFeatureAttrMapFilename
protected
DtNavigationFeatureBuilder* makVrv::DtNavigationFeatureManager::myNavigationFeatureBuilder
protected
int makVrv::DtNavigationFeatureManager::myPresenceSwitchNumber
protected
int makVrv::DtNavigationFeatureManager::myTypeSwitchNumber
protected
FeatureStylesList makVrv::DtNavigationFeatureManager::myFeatureStylesList
protected

The list of osgEarth model styles we want to be notified about.

PendingFeatureAttachmentMap makVrv::DtNavigationFeatureManager::myDetachedFeatures
protected

Features start here. When attached they move to...

PendingFeatureAttachmentMap makVrv::DtNavigationFeatureManager::myAttachedFeatures
protected

...here.

When buoys attached to a feature page out, they move back to the waiting list

FeatureToFeatureMap makVrv::DtNavigationFeatureManager::myFeatureToBuoyOrBeaconMap
protected
FeatureToFeatureMap makVrv::DtNavigationFeatureManager::myBuoyOrBeaconToFeatureMap
protected
DtBuoyBeaconLayer& makVrv::DtNavigationFeatureManager::myBuoyBeaconLayer
protected

Access to the buoys.

boost::signalslib::connection makVrv::DtNavigationFeatureManager::myPostInitializeConnection
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)