![]() |
VR-Forces 5.0.1 Developer's Guide
|
The DtBuoyBeaconLayer is the base implementation of a layer of data which contains buoys and beacons that are part of the terrain.
Public Types | |
| enum | AttachableTypes { AttachableLights = 0, AttachableDaymarks = 1, AttachableTopmarks = 2 } |
| typedef std::map< DtUniqueID, DtBuoyOrBeaconFacade * > | BuoyBeaconMap |
| typedef bool | HasAttachable [NumAttachableTypes] |
Public Member Functions | |
| DtBuoyBeaconLayer (DtDe &de, DtAgentManagerInterface &sceneInterface) | |
| virtual | ~DtBuoyBeaconLayer () |
| virtual void | addBuoyOrBeacon (DtBuoyOrBeaconFacade *buoy, const DtVector &initialPosition, HasAttachable attachables) |
| virtual bool | destroyBuoyOrBeacon (DtUniqueID elementId) |
| virtual DtBuoyOrBeaconFacade * | findBuoyOrBeacon (DtUniqueID elementId) |
| const BuoyBeaconMap & | buoysAndBeacons () const |
| DtUniqueID | findBuoyOrBeaconWithAttachablePosition (AttachableTypes type, const DtVector &position) |
| void | moveBuoyOrBeaconToDetachedFromList (AttachableTypes type, DtUniqueID elementId) |
| void | moveBuoyOrBeaconToAttachedToList (AttachableTypes type, DtUniqueID elementId) |
| void | set2dIconsEnabled (bool enabled) |
Static Public Attributes | |
| static const int | NumAttachableTypes = 3 |
Protected Types | |
| typedef boost::unordered_multimap < std::string, std::string > | StylesMap |
| typedef boost::unordered_map < DtUniqueID, DtVector > | PendingItemAttachmentMap |
Protected Member Functions | |
| void | slot_sceneCreated () |
| void | slot_postInitialize () |
| virtual void | initializeFeatureCreators () |
| bool | readStyleListFile (const std::string &path, const std::string &layerListFileName, StylesMap &map) |
Static Protected Attributes | |
| static const char * | S57AttrMapFilename |
| static const char * | S57ModelDefByNameMap |
| static const char * | S57LayerList |
| static const char * | S57Defaults |
| static const char * | S57IconMap |
| typedef std::map<DtUniqueID, DtBuoyOrBeaconFacade*> makVrv::DtBuoyBeaconLayer::BuoyBeaconMap |
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.
|
protected |
Type for sets of style names (layers) we listen to.
|
protected |
List of buoy and beacons ids and locations that should be attached to an attachable item.
| makVrv::DtBuoyBeaconLayer::DtBuoyBeaconLayer | ( | DtDe & | de, |
| DtAgentManagerInterface & | sceneInterface | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
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 |
Destroys the Buoy or Beacon with the unique id. Returns true if the object was destroyed, false otherwise.
|
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.
|
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.
|
protected |
slot used to wait for postInitialized signal
|
protectedvirtual |
Register creators with the streamed feature manager for each buoy and beacon layer of interest.
|
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.
|
static |
The numer of Attachable types in the AttachableTypes list.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
buoys and beacons are initially placed here if has<attachableType> is true
|
protected |
Buoys and beacons get moved to one of these maps when they get attached to an attachable type.
|
protected |