VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBuoyBeaconLayer.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtUniqueID.h>
14 
16 
17 #include <matrix/vlVector.h>
18 
19 #include <map>
20 #include <list>
21 #include <string>
22 
23 #include <boost/unordered_map.hpp>
24 
25 namespace makVrv
26 {
27  class DtDe;
28  class DtAgentManagerInterface;
29  class DtBuoyOrBeaconFacade;
30  class DtBuoyBeaconModelStringParser;
31  class DtTextureAtlasIndexParser;
32 
37  {
38  public:
40  typedef std::map<DtUniqueID, DtBuoyOrBeaconFacade*> BuoyBeaconMap;
41 
47  {
48  AttachableLights = 0,
49  AttachableDaymarks = 1,
50  AttachableTopmarks = 2
51  };
52 
54  static const int NumAttachableTypes = 3;
55 
59  typedef bool HasAttachable[NumAttachableTypes];
60 
62  DtBuoyBeaconLayer(DtDe& de, DtAgentManagerInterface& sceneInterface);
63 
65  virtual ~DtBuoyBeaconLayer();
66 
71  // The initial (streamed-in) location of the object
75  virtual void addBuoyOrBeacon( DtBuoyOrBeaconFacade* buoy,
76  const DtVector& initialPosition, HasAttachable attachables );
77 
80  virtual bool destroyBuoyOrBeacon( DtUniqueID elementId );
81 
84  virtual DtBuoyOrBeaconFacade* findBuoyOrBeacon( DtUniqueID elementId );
85 
87  const BuoyBeaconMap& buoysAndBeacons() const;
88 
92  DtUniqueID findBuoyOrBeaconWithAttachablePosition( AttachableTypes type,
93  const DtVector& position );
94 
98  void moveBuoyOrBeaconToDetachedFromList( AttachableTypes type,
99  DtUniqueID elementId );
100 
104  void moveBuoyOrBeaconToAttachedToList( AttachableTypes type,
105  DtUniqueID elementId );
106 
109  void set2dIconsEnabled(bool enabled);
110 
111  protected:
112 
116  void slot_sceneCreated();
117 
119  void slot_postInitialize();
120 
123  virtual void initializeFeatureCreators();
124 
126  typedef boost::unordered_multimap<std::string, std::string> StylesMap;
127 
131  bool readStyleListFile( const std::string& path,
132  const std::string& layerListFileName, StylesMap& map );
133 
134  protected:
135  static const char* S57AttrMapFilename;
136  static const char* S57ModelDefByNameMap;
137  static const char* S57LayerList;
138  static const char* S57Defaults;
139  static const char* S57IconMap;
140 
141  protected:
148  std::string myName;
149 
151 
154  typedef boost::unordered_map<DtUniqueID, DtVector>
156 
159  PendingItemAttachmentMap myDetachedBuoysAndBeacons[NumAttachableTypes];
160 
163  PendingItemAttachmentMap myAttachedBuoysAndBeacons[NumAttachableTypes];
164 
165  boost::signals::connection myPostInitializeConnection;
166  };
167 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)