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

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

Public Types

enum  AttachableTypes { AttachableLights = 0, AttachableDaymarks = 1, AttachableTopmarks = 2 }
 These are used to tell managers of attachable items what type of item they manage; they are also used as indices into arrays of structures in the BuoyBeaconLayer that are maintained for each attachable type. More...
typedef std::map< DtUniqueID,
DtBuoyOrBeaconFacade * > 
BuoyBeaconMap
 List of Buoys and Beacons.
typedef bool HasAttachable [NumAttachableTypes]
 This type is used when creating the buoy or beacon to indicate which attachable types are potentially possible on that object.

Public Member Functions

 DtBuoyBeaconLayer (DtDe &de, DtAgentManagerInterface &sceneInterface)
 CTOR.
virtual ~DtBuoyBeaconLayer ()
 DTOR.
virtual void addBuoyOrBeacon (DtBuoyOrBeaconFacade *buoy, const DtVector &initialPosition, HasAttachable attachables)
 Add Buoy or beacon.
virtual bool destroyBuoyOrBeacon (DtUniqueID elementId)
 Destroys the Buoy or Beacon with the unique id.
virtual DtBuoyOrBeaconFacadefindBuoyOrBeacon (DtUniqueID elementId)
 Finds a pointer to the Buoy or Beacon on the feature layer with the same identifiers as the passed in id.
const BuoyBeaconMapbuoysAndBeacons () const
 Get the container of Buoys and Beacons associated with the layer.
DtUniqueID findBuoyOrBeaconWithAttachablePosition (AttachableTypes type, const DtVector &position)
 Look through the list of objects that are unattached and can have items attached to them for one with the same position as position provided.
void moveBuoyOrBeaconToDetachedFromList (AttachableTypes type, DtUniqueID elementId)
 Move an object from the list of attachable objects that are unattached to the list of objects that are attached.
void moveBuoyOrBeaconToAttachedToList (AttachableTypes type, DtUniqueID elementId)
 Move an object from the list of objects with a an item attached to the list of objects without.
void set2dIconsEnabled (bool enabled)
 This method will iterate through the list of buoys and beacons, calling setVisible on each 2d facade with the value provided.

Static Public Attributes

static const int NumAttachableTypes = 3
 The numer of Attachable types in the AttachableTypes list.

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 and beacons ids and locations that should be attached to an attachable item.

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 and beacon 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
BuoyBeaconMap myBuoysAndBeacons
DtSignalConnectionManager myConnections
DtBuoyBeaconModelStringParsermyBuoyMarkerStringParser
DtTextureAtlasIndexParsermyTextureAtlasIndexParser
std::string myName
StylesMap myStylesMap
PendingItemAttachmentMap myDetachedBuoysAndBeacons [NumAttachableTypes]
 buoys and beacons are initially placed here if has<attachableType> is true
PendingItemAttachmentMap myAttachedBuoysAndBeacons [NumAttachableTypes]
 Buoys and beacons get moved to one of these maps when they get attached to an attachable type.
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 DtBuoyBeaconLayer is the base implementation of a layer of data which contains buoys and beacons that are part of the terrain.

Member Typedef Documentation

List of Buoys and Beacons.

typedef bool makVrv::DtBuoyBeaconLayer::HasAttachable[NumAttachableTypes]

This type is used when creating the buoy or beacon to indicate which attachable types are potentially possible on that object.

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

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

List of buoy and beacons ids and locations that should be attached to an attachable item.

Member Enumeration Documentation

These are used to tell managers of attachable items what type of item they manage; they are also used as indices into arrays of structures in the BuoyBeaconLayer that are maintained for each attachable type.

Enumerator:
AttachableLights 
AttachableDaymarks 
AttachableTopmarks 

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtBuoyBeaconLayer::~DtBuoyBeaconLayer ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtBuoyBeaconLayer::addBuoyOrBeacon ( DtBuoyOrBeaconFacade buoy,
const DtVector initialPosition,
HasAttachable  attachables 
)
virtual

Add Buoy or beacon.

Ownership of the Buoy or beacon will be passed to the layer. hasNavLights flag puts the objects location/ and id onto list of objects to search through when streamed lights are attached. hasNavDaymarks and hasNavTopmarks work similarly. 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 attachable items are matched to the objects they're attached to

virtual bool makVrv::DtBuoyBeaconLayer::destroyBuoyOrBeacon ( DtUniqueID  elementId)
virtual

Destroys the Buoy or Beacon with the unique id.

Returns true if the object was destroyed, false otherwise.

virtual DtBuoyOrBeaconFacade* makVrv::DtBuoyBeaconLayer::findBuoyOrBeacon ( DtUniqueID  elementId)
virtual

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

const BuoyBeaconMap& makVrv::DtBuoyBeaconLayer::buoysAndBeacons ( ) const

Get the container of Buoys and Beacons associated with the layer.

DtUniqueID makVrv::DtBuoyBeaconLayer::findBuoyOrBeaconWithAttachablePosition ( AttachableTypes  type,
const DtVector position 
)

Look through the list of objects that are unattached and can have items attached to them for one with the same position as position provided.

void makVrv::DtBuoyBeaconLayer::moveBuoyOrBeaconToDetachedFromList ( AttachableTypes  type,
DtUniqueID  elementId 
)

Move an object from the list of attachable objects that are unattached to the list of objects that are attached.

Typically only called by a navigation item manager when it finds an attachment

void makVrv::DtBuoyBeaconLayer::moveBuoyOrBeaconToAttachedToList ( AttachableTypes  type,
DtUniqueID  elementId 
)

Move an object from the list of objects with a an item attached to the list of objects without.

Typically called by a navigation item manager when an attachable item is paged out

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

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

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

slot used to wait for postInitialized signal

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

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

bool makVrv::DtBuoyBeaconLayer::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 int makVrv::DtBuoyBeaconLayer::NumAttachableTypes = 3
static

The numer of Attachable types in the AttachableTypes list.

const char* makVrv::DtBuoyBeaconLayer::S57AttrMapFilename
staticprotected
const char* makVrv::DtBuoyBeaconLayer::S57ModelDefByNameMap
staticprotected
const char* makVrv::DtBuoyBeaconLayer::S57LayerList
staticprotected
const char* makVrv::DtBuoyBeaconLayer::S57Defaults
staticprotected
const char* makVrv::DtBuoyBeaconLayer::S57IconMap
staticprotected
DtDe& makVrv::DtBuoyBeaconLayer::myDe
protected
DtAgentManagerInterface& makVrv::DtBuoyBeaconLayer::mySceneInterface
protected
BuoyBeaconMap makVrv::DtBuoyBeaconLayer::myBuoysAndBeacons
protected
DtSignalConnectionManager makVrv::DtBuoyBeaconLayer::myConnections
protected
DtBuoyBeaconModelStringParser* makVrv::DtBuoyBeaconLayer::myBuoyMarkerStringParser
protected
DtTextureAtlasIndexParser* makVrv::DtBuoyBeaconLayer::myTextureAtlasIndexParser
protected
std::string makVrv::DtBuoyBeaconLayer::myName
protected
StylesMap makVrv::DtBuoyBeaconLayer::myStylesMap
protected
PendingItemAttachmentMap makVrv::DtBuoyBeaconLayer::myDetachedBuoysAndBeacons[NumAttachableTypes]
protected

buoys and beacons are initially placed here if has<attachableType> is true

PendingItemAttachmentMap makVrv::DtBuoyBeaconLayer::myAttachedBuoysAndBeacons[NumAttachableTypes]
protected

Buoys and beacons get moved to one of these maps when they get attached to an attachable type.

boost::signals::connection makVrv::DtBuoyBeaconLayer::myPostInitializeConnection
protected

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)