VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 objects 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 * > 
ObjectMap
 Type for a map of controller IDs to DtNavigationFeature.

Public Member Functions

 DtNavigationFeatureManager (DtDe &de, DtAgentManagerInterface &sceneInterface, DtBuoyLayer &buoyLayer)
 CTOR.
virtual ~DtNavigationFeatureManager ()
 DTOR.
bool readObjectStyleListFile (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 addObject (DtNavigationFeature *object)=0
 Add a object (ex.
DtNavigationFeaturefindObject (DtUniqueID elementId)
 Finds a pointer to the object controller with the given element id.
virtual bool destroyObject (DtUniqueID id)
 Destroys the object with the element id.
virtual DtUniqueID findObjectWithPosition (const DtVector &position)
 Look through the list of unattached objects for a object with the specified position.
const ObjectMapobjects () const
 Get the container of objects associated held by the manager.
ObjectMapobjects ()
 Get the container of objects associated held by the manager.
virtual bool needsUpdate (DtTime tNow)=0
 Tickable implementation The check function called by DtTickableManager to verify if an update is required.
virtual void update (DtTime tNow)=0
 The update function called by DtTickableManager during update-ticks.
- Public Member Functions inherited from makVrv::DtTickable
virtual ~DtTickable ()
 Virtual DTOR.

Protected Types

typedef std::list< std::string > ObjectStylesList
typedef boost::unordered_map
< DtUniqueID, DtVector
PendingObjectAttachmentMap
 Type for hash table of object ids and locations.
typedef boost::unordered_map
< DtUniqueID, DtUniqueID
ObjectToObjectMap
 Type for hash tables of objects to attached buoys and attached buoys to objects.

Protected Member Functions

 DtNavigationFeatureManager ()
 CTOR (unimplemented default CTOR )
 DtNavigationFeatureManager (const DtNavigationFeatureManager &orig)
 Copy CTOR (unimplemented)
DtNavigationFeatureManageroperator= (const DtNavigationFeatureManager &rhs)
 Assigment operator (unimplemented)
virtual void attachToBuoy (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoy)=0
 Helper function for setting up a buoy/beacon attachment.
virtual void detachFromBuoy (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoy)=0
 Helper function for detaching from a buoy/beacon.
virtual void moveObjectToDetachedObjectList (DtUniqueID controllerId)
 Move objects from the list of attached objects to the list of unattached objects.
virtual void moveObjectToAttachedObjectList (DtUniqueID controllerId)
 Move objects from the list of unattached objects to the list of attached objects.
virtual void initializeFeatureCreators ()=0
 Register creators with the streamed feature manager for each object layer (osgEarth model style) of interest.
virtual void slot_featureToBeDeleted (const std::string &myLayerName, DtUniqueID featureId)
 Slot connected to signal from the streamed feature manager that a object has paged out.
virtual void slot_buoyCreated (DtBuoyOrBeaconFacade &buoy, const DtVector &initialPosition)=0
 Slot connected to signal from the streamed feature manager that a buoy has paged in.
virtual void slot_buoyAboutToBeDestroyed (const DtBuoyOrBeaconFacade &buoy)
 Slot connected to signal from the streamed feature manager that a buoy has paged out.
void slot_sceneCreated ()
 If the IG is initialized when this is called, it will call initializeFeatureCreators.
void slot_postInitialize ()
 slot used to wait for postInitialized signal
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR.
 DtTickable ()
 Unimplemented default CTOR.

Protected Attributes

const charObjectLayerList
const charObjectAttrMapFilename
DtDemyDe
DtAgentManagerInterfacemySceneInterface
ObjectMap myObjects
DtSignalConnectionManager myConnections
DtNavigationFeatureStringParsermyObjectStringParser
std::string myName
ObjectStylesList myObjectStylesList
 The list of osgEarth model styles we want to be notified about.
PendingObjectAttachmentMap myDetachedObjects
 Objects start here. When attached they move to...
PendingObjectAttachmentMap myAttachedObjects
 ...here.
ObjectToObjectMap myObjectToBuoyMap
ObjectToObjectMap myBuoyToObjectMap
DtBuoyLayermyBuoyLayer
 Access to the buoys.
boost::signals::connection myPostInitializeConnection
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction.

Detailed Description

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

It is also responsible for updating the objects and removing them when the streamed objects page out

Member Typedef Documentation

Type for a map of controller IDs to DtNavigationFeature.

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

Type for hash table of object ids and locations.

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

Constructor & Destructor Documentation

makVrv::DtNavigationFeatureManager::DtNavigationFeatureManager ( DtDe de,
DtAgentManagerInterface sceneInterface,
DtBuoyLayer buoyLayer 
)

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::readObjectStyleListFile ( 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::addObject ( DtNavigationFeature object)
pure virtual

Add a object (ex.

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

Implemented in makVrv::DtNavigationDaymarkManager, and makVrv::DtNavigationLightManager.

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

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

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

Destroys the object with the element id.

Returns true if the object was destroyed, false otherwise.

const ObjectMap& makVrv::DtNavigationFeatureManager::objects ( ) const

Get the container of objects associated held by the manager.

ObjectMap& makVrv::DtNavigationFeatureManager::objects ( )

Get the container of objects associated held by the manager.

virtual bool makVrv::DtNavigationFeatureManager::needsUpdate ( DtTime  tNow)
pure virtual

Tickable implementation The check function called by DtTickableManager to verify if an update is required.

If this function returns true, the DtTickableManager will then call update().

Parameters
[in]tNowis the current time-stamp.
Return values
true

Implements makVrv::DtTickable.

Implemented in makVrv::DtNavigationDaymarkManager, and makVrv::DtNavigationLightManager.

virtual void makVrv::DtNavigationFeatureManager::update ( DtTime  tNow)
pure virtual

The update function called by DtTickableManager during update-ticks.

Parameters
[in]tNowis the current time-stamp. This method calls update() for all attached objects

Implements makVrv::DtTickable.

Implemented in makVrv::DtNavigationDaymarkManager, and makVrv::DtNavigationLightManager.

virtual DtUniqueID makVrv::DtNavigationFeatureManager::findObjectWithPosition ( const DtVector position)
virtual

Look through the list of unattached objects for a object with the specified position.

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

Assigment operator (unimplemented)

virtual void makVrv::DtNavigationFeatureManager::attachToBuoy ( DtNavigationFeature controller,
DtBuoyOrBeaconFacade buoy 
)
protectedpure virtual

Helper function for setting up a buoy/beacon attachment.

Implemented in makVrv::DtNavigationLightManager, and makVrv::DtNavigationDaymarkManager.

virtual void makVrv::DtNavigationFeatureManager::detachFromBuoy ( DtNavigationFeature controller,
DtBuoyOrBeaconFacade buoy 
)
protectedpure virtual

Helper function for detaching from a buoy/beacon.

Implemented in makVrv::DtNavigationLightManager, and makVrv::DtNavigationDaymarkManager.

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

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

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

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

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

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

Implemented in makVrv::DtNavigationLightManager, and makVrv::DtNavigationDaymarkManager.

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

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

virtual void makVrv::DtNavigationFeatureManager::slot_buoyCreated ( DtBuoyOrBeaconFacade buoy,
const DtVector initialPosition 
)
protectedpure virtual

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

Implemented in makVrv::DtNavigationLightManager, and makVrv::DtNavigationDaymarkManager.

virtual void makVrv::DtNavigationFeatureManager::slot_buoyAboutToBeDestroyed ( 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

const char* makVrv::DtNavigationFeatureManager::ObjectLayerList
protected
const char* makVrv::DtNavigationFeatureManager::ObjectAttrMapFilename
protected
DtDe& makVrv::DtNavigationFeatureManager::myDe
protected
DtAgentManagerInterface& makVrv::DtNavigationFeatureManager::mySceneInterface
protected
ObjectMap makVrv::DtNavigationFeatureManager::myObjects
protected
DtSignalConnectionManager makVrv::DtNavigationFeatureManager::myConnections
protected
DtNavigationFeatureStringParser* makVrv::DtNavigationFeatureManager::myObjectStringParser
protected
std::string makVrv::DtNavigationFeatureManager::myName
protected
ObjectStylesList makVrv::DtNavigationFeatureManager::myObjectStylesList
protected

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

PendingObjectAttachmentMap makVrv::DtNavigationFeatureManager::myDetachedObjects
protected

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

PendingObjectAttachmentMap makVrv::DtNavigationFeatureManager::myAttachedObjects
protected

...here.

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

ObjectToObjectMap makVrv::DtNavigationFeatureManager::myObjectToBuoyMap
protected
ObjectToObjectMap makVrv::DtNavigationFeatureManager::myBuoyToObjectMap
protected
DtBuoyLayer& makVrv::DtNavigationFeatureManager::myBuoyLayer
protected

Access to the buoys.

boost::signals::connection makVrv::DtNavigationFeatureManager::myPostInitializeConnection
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)