VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtLightIndicatorManager.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 #include <vrvCore/DtDe.h>
12 #include <vrvCore/DtUniqueID.h>
13 #include <vrvOsg/vrvOsg.h>
17 #include <matrix/vlVector.h>
18 #include <osg/Group>
19 #include <boost/unordered_map.hpp>
20 
21 namespace makVrv
22 {
23  class DtOsgArticulatedModel;
24  class DtSceneObject;
25 
28  {
29  std::string apt_icao;
30  std::string runway_num;
31  double heading;
32  std::string light_type;
33  double glide_angle;
35  };
36 
38  // via DtLightIndicatorSignaler
39  class DT_DLL_VRVOSG DtLightIndicatorNode : public osg::Group
40  {
41  public:
43 
45 
46  public:
49  };
50 
54  {
55  public:
57  static DtLightIndicatorSignaler& instance(DtDe& anIG);
58 
60  virtual ~DtLightIndicatorSignaler();
61 
63  boost::signal<void ( DtLightIndicatorData& )> signal_LightIndicatorCreated;
64 
66  boost::signal<void ( DtLightIndicatorData& )> signal_LightIndicatorDeleted;
67 
68  protected:
69 
71 
72  };
73 
75  {
76  public:
77 
78  typedef boost::unordered_map<DtUniqueID, DtOsgArticulatedModel* >
80 
81  typedef boost::unordered_map<DtUniqueID, DtSceneObject* >
83 
85  static DtLightIndicatorManager& instance(DtDe& anIG);
86 
88  virtual ~DtLightIndicatorManager();
89 
91  virtual void slot_LightIndicatorCreated(DtLightIndicatorData& lightIndicatorData);
92 
94  virtual void slot_LightIndicatorDestroyed(DtLightIndicatorData& lightIndicatorData);
95 
97  virtual std::size_t hashPos(DtVector& pos);
98 
100  virtual void setModelDefinitionForType(std::string& light_type, const std::string& modelDef);
101 
104  virtual void clearModelDefinitionForType(std::string& light_type);
105 
107  // default is SignLightIndicator
108  virtual void setDefaultModelDefinition(const std::string& modelDef);
109 
112  virtual void updateLightIndicatorManager();
113 
116  virtual void createLightIndicator(DtLightIndicatorData& signData);
117 
119  DtVector geodeticToCig(const DtVector& pos) const;
120 
121  public:
122 
123  boost::signal<void ( DtLightIndicatorData& )> signal_LightIndicatorDeleted;
124  boost::signal<void ( DtLightIndicatorData& )> signal_LightIndicatorCreated;
125 
126  protected:
127 
129 
132  // For creating DtOsgArticulated models on the main thread
134 
136  // The signs are DtOsgArticulatedModels, they are put under a DtSceneObject
137  // so that they work when instancing is off
138  // The DtSceneObject doesn't have the transform, the articulated model does
140 
141  std::map<std::string, std::string> myLightIndicatorModelDefinitions;
143  };
144 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)