VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtNavigationFeatureManager.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/DtTickable.h>
13 #include <vrvCore/DtUniqueID.h>
15 
17 
18 #include <matrix/vlVector.h>
19 
20 #include <boost/unordered_map.hpp>
21 
22 #include <map>
23 
24 namespace makVrv
25 {
26  class DtDe;
27  class DtAgentManagerInterface;
28  class DtNavigationFeatureStringParser;
29  class DtBuoyOrBeaconFacade;
30  class DtNavigationFeature;
31  class DtNavigationFeatureBuilder;
32 
39  {
40  public:
42  typedef std::map<DtUniqueID, DtNavigationFeature*>
44 
46  DtNavigationFeatureManager(const std::string& name, DtDe& de,
47  DtAgentManagerInterface& sceneInterface,
48  DtBuoyBeaconLayer& buoyBeaconLayer,
50  const std::string& featureLayerList,
51  const std::string& featureAttrMapFilename,
52  DtNavigationFeatureBuilder* featureBuilder,
53  int presenceSwitchNum, int typeSwitchNum );
54 
56  virtual ~DtNavigationFeatureManager();
57 
61  bool readFeatureStyleListFile( const std::string& path,
62  const std::string& layerListFileName );
63 
66  virtual void addFeature( DtNavigationFeature* feature );
67 
69  DtNavigationFeature* findFeature( DtUniqueID elementId );
70 
73  virtual bool destroyFeature( DtUniqueID id );
74 
76 
77  const FeatureMap& features() const;
78  FeatureMap& features();
80 
83  virtual DtUniqueID findFeatureWithPosition( const DtVector& position );
84 
85  protected:
88 
91 
94 
95  virtual void setPresenceSwitchNumber( int switchNum );
96  virtual int presenceSwitchNumber() const;
97 
98  virtual void setTypeSwitchNumber( int typeNum );
99  virtual int typeSwitchNumber() const;
100 
102  virtual void attachToBuoyOrBeacon( DtNavigationFeature& controller,
103  DtBuoyOrBeaconFacade& buoyOrBeacon );
104 
106  virtual void detachFromBuoyOrBeacon( DtNavigationFeature& controller,
107  DtBuoyOrBeaconFacade& buoy );
108 
111  virtual void moveFeatureToDetachedFeatureList( DtUniqueID controllerId );
112 
115  virtual void moveFeatureToAttachedFeatureList( DtUniqueID controllerId );
116 
119  virtual void initializeFeatureCreators();
120 
123  virtual void slot_featureToBeDeleted( const std::string& myLayerName,
124  DtUniqueID featureId );
125 
128  virtual void slot_buoyOrBeaconCreated( DtBuoyOrBeaconFacade& buoy,
129  const DtVector& initialPosition );
130 
133  virtual void slot_buoyOrBeaconAboutToBeDestroyed(
134  const DtBuoyOrBeaconFacade& buoy );
135 
139  void slot_sceneCreated();
140 
142  void slot_postInitialize();
143 
144  protected:
149  std::string myName;
151  std::string myFeatureLayerList;
156 
157  typedef std::list<std::string> FeatureStylesList;
158 
161 
163  typedef boost::unordered_map<DtUniqueID, DtVector>
165 
168 
172 
175  typedef boost::unordered_map<DtUniqueID, DtUniqueID>
177 
180 
183 
184  boost::signals::connection myPostInitializeConnection;
185 
186  };
187 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)