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 | Static Protected Attributes
makVrv::DtBuoyLayer Class Reference

The DtBuoyLayer is the base implementation of a layer of data which contains buoys that are part of the terrain. More...

Public Types

typedef std::map< DtUniqueID,
DtBuoyOrBeaconFacade * > 
BuoyMap
 List of Buoys.

Public Member Functions

 DtBuoyLayer (DtDe &de, DtAgentManagerInterface &sceneInterface)
 CTOR.
virtual ~DtBuoyLayer ()
 DTOR.
virtual void addBuoy (DtBuoyOrBeaconFacade *buoy, const DtVector &initialPosition, bool hasNavLights=false, bool hasNavDaymarks=false)
 Add Buoy based on the DtBuoyRecord.
virtual bool destroyBuoy (DtUniqueID id)
 Destroys the Buoy with the unique name.
virtual DtBuoyOrBeaconFacadefindBuoy (DtUniqueID elementId)
 Finds a pointer to the Buoy on the feature layer with the same identifiers as the passed in Buoy.
const BuoyMapbuoys () const
 Get the container of Buoys associated with the layer.
DtUniqueID findBuoyWithLightPosition (const DtVector &lightPosition)
 Look through the list of buoys that are unattached and can have lights attached to them for one with the same position as lightPosition.
void moveBuoyToDetachedFromLightList (DtUniqueID buoyId)
 Move a buoy from the list of lightable buoys that are unattached to the list of buoys that are attached.
void moveBuoyToAttachedToLightList (DtUniqueID buoyId)
 Move a buoy from the list of buoys with a lights attached to them to the list of buoys without.
DtUniqueID findBuoyWithDaymarkPosition (const DtVector &daymarkPosition)
 Look through the list of buoys/beacons that are unattached and can have daymarks attached to them for one with the same position as daymarkPosition.
void moveBuoyToDetachedFromDaymarkList (DtUniqueID buoyId)
 Move a buoy/beacon from the list of daymark-capable buoys/beacons that are unattached to the list of buoys/beacpms that are attached.
void moveBuoyToAttachedToDaymarkList (DtUniqueID buoyId)
 Move a buoy/beacon from the list of buoys/beacons with a daymark attached to the list of buoys/beacons without.
void set2dIconsEnabled (bool enabled)
 This method will iterate through the list of buoys calling setVisible on each 2d facade with the value provided.

Protected Types

typedef
boost::unordered_multimap
< std::string, std::string > 
StylesMap
 Type for sets of style names (layers) we listen to.
typedef boost::unordered_map
< DtUniqueID, DtVector
PendingItemAttachmentMap
 List of buoy ids and locations of buoys that should hae lights not attached to lights yet.

Protected Member Functions

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
virtual void initializeFeatureCreators ()
 Register creators with the streamed feature manager for each buoy layer of interest.
bool readStyleListFile (const std::string &path, const std::string &layerListFileName, StylesMap &map)
 Read a file that specifies a list of osgEarth style names that we wish to have our registered builder called for when features are streamed in.

Protected Attributes

DtDemyDe
DtAgentManagerInterfacemySceneInterface
BuoyMap myBuoys
DtSignalConnectionManager myConnections
DtBuoyMarkerStringParsermyBuoyMarkerStringParser
DtBuoyTextureAtlasFileParsermyBuoyAtlasFileParser
std::string myName
StylesMap myStylesMap
PendingItemAttachmentMap myBuoysDetachedFromLights
 buoys start here. When attached they move to...
PendingItemAttachmentMap myBuoysAttachedToLights
 ...here.
PendingItemAttachmentMap myBuoysDetachedFromDaymarks
 Buoys/beacons (mostly beacons) are added here first and then move to.
PendingItemAttachmentMap myBuoysAttachedToDaymarks
 ...here.
boost::signals::connection myPostInitializeConnection

Static Protected Attributes

static const charS57AttrMapFilename
static const charS57ModelDefByNameMap
static const charS57LayerList
static const charS57Defaults
static const charS57IconMap

Detailed Description

The DtBuoyLayer is the base implementation of a layer of data which contains buoys that are part of the terrain.

Member Typedef Documentation

List of Buoys.

typedef boost::unordered_multimap<std::string, std::string> makVrv::DtBuoyLayer::StylesMap
protected

Type for sets of style names (layers) we listen to.

typedef boost::unordered_map<DtUniqueID, DtVector> makVrv::DtBuoyLayer::PendingItemAttachmentMap
protected

List of buoy ids and locations of buoys that should hae lights not attached to lights yet.

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtBuoyLayer::~DtBuoyLayer ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtBuoyLayer::addBuoy ( DtBuoyOrBeaconFacade buoy,
const DtVector initialPosition,
bool  hasNavLights = false,
bool  hasNavDaymarks = false 
)
virtual

Add Buoy based on the DtBuoyRecord.

Ownership of the Buoy will be passed to the layer. hasNavLights flag puts the buoys location/ and id onto list of buoys to search through when streamed lights are attached. The initial (streamed-in) location of the buoy is passed in since it won't be available yet from the facade, and we need that exact location kept around because that is how lights are matched to the buoys they're attached to

virtual bool makVrv::DtBuoyLayer::destroyBuoy ( DtUniqueID  id)
virtual

Destroys the Buoy with the unique name.

Returns true if the Buoy was destroyed, false otherwise.

virtual DtBuoyOrBeaconFacade* makVrv::DtBuoyLayer::findBuoy ( DtUniqueID  elementId)
virtual

Finds a pointer to the Buoy on the feature layer with the same identifiers as the passed in Buoy.

const BuoyMap& makVrv::DtBuoyLayer::buoys ( ) const

Get the container of Buoys associated with the layer.

DtUniqueID makVrv::DtBuoyLayer::findBuoyWithLightPosition ( const DtVector lightPosition)

Look through the list of buoys that are unattached and can have lights attached to them for one with the same position as lightPosition.

void makVrv::DtBuoyLayer::moveBuoyToDetachedFromLightList ( DtUniqueID  buoyId)

Move a buoy from the list of lightable buoys that are unattached to the list of buoys that are attached.

Typically only called by the navigation light manager when it finds an attachment

void makVrv::DtBuoyLayer::moveBuoyToAttachedToLightList ( DtUniqueID  buoyId)

Move a buoy from the list of buoys with a lights attached to them to the list of buoys without.

Typically called by the navigation light manager when a light is paged out

DtUniqueID makVrv::DtBuoyLayer::findBuoyWithDaymarkPosition ( const DtVector daymarkPosition)

Look through the list of buoys/beacons that are unattached and can have daymarks attached to them for one with the same position as daymarkPosition.

void makVrv::DtBuoyLayer::moveBuoyToDetachedFromDaymarkList ( DtUniqueID  buoyId)

Move a buoy/beacon from the list of daymark-capable buoys/beacons that are unattached to the list of buoys/beacpms that are attached.

Typically only called by the navigation daymark manager when it finds an attachment

void makVrv::DtBuoyLayer::moveBuoyToAttachedToDaymarkList ( DtUniqueID  buoyId)

Move a buoy/beacon from the list of buoys/beacons with a daymark attached to the list of buoys/beacons without.

Typically called by the navigation daymark manager when a daymark is paged out

void makVrv::DtBuoyLayer::set2dIconsEnabled ( bool  enabled)

This method will iterate through the list of buoys calling setVisible on each 2d facade with the value provided.

void makVrv::DtBuoyLayer::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::DtBuoyLayer::slot_postInitialize ( )
protected

slot used to wait for postInitialized signal

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

Register creators with the streamed feature manager for each buoy layer of interest.

bool makVrv::DtBuoyLayer::readStyleListFile ( const std::string &  path,
const std::string &  layerListFileName,
StylesMap map 
)
protected

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

Member Data Documentation

const char* makVrv::DtBuoyLayer::S57AttrMapFilename
staticprotected
const char* makVrv::DtBuoyLayer::S57ModelDefByNameMap
staticprotected
const char* makVrv::DtBuoyLayer::S57LayerList
staticprotected
const char* makVrv::DtBuoyLayer::S57Defaults
staticprotected
const char* makVrv::DtBuoyLayer::S57IconMap
staticprotected
DtDe& makVrv::DtBuoyLayer::myDe
protected
DtAgentManagerInterface& makVrv::DtBuoyLayer::mySceneInterface
protected
BuoyMap makVrv::DtBuoyLayer::myBuoys
protected
DtSignalConnectionManager makVrv::DtBuoyLayer::myConnections
protected
DtBuoyMarkerStringParser* makVrv::DtBuoyLayer::myBuoyMarkerStringParser
protected
DtBuoyTextureAtlasFileParser* makVrv::DtBuoyLayer::myBuoyAtlasFileParser
protected
std::string makVrv::DtBuoyLayer::myName
protected
StylesMap makVrv::DtBuoyLayer::myStylesMap
protected
PendingItemAttachmentMap makVrv::DtBuoyLayer::myBuoysDetachedFromLights
protected

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

PendingItemAttachmentMap makVrv::DtBuoyLayer::myBuoysAttachedToLights
protected

...here.

When lights page out, the move back to the waiting list

PendingItemAttachmentMap makVrv::DtBuoyLayer::myBuoysDetachedFromDaymarks
protected

Buoys/beacons (mostly beacons) are added here first and then move to.

PendingItemAttachmentMap makVrv::DtBuoyLayer::myBuoysAttachedToDaymarks
protected

...here.

When daymarks page out, they move back to the waiting list

boost::signals::connection makVrv::DtBuoyLayer::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)