VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLightIndicatorManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvOsg/vrvOsg.h>
12 
13 #include <vrvOsg/DtAerodromeNode.h>
14 
15 #include <vrvCore/DtDe.h>
16 #include <vrvCore/DtUniqueID.h>
17 
20 
21 #include <matrix/vlVector.h>
22 
23 #include <osg/Group>
24 
25 #include <tbb/concurrent_queue.h>
26 
27 #include <unordered_map>
28 
29 namespace makVrv
30 {
31  class DtOsgArticulatedModel;
32  class DtSceneObject;
33  class DtCoordinateSystem;
34 
35 
37  {
38  public:
39 
40  typedef std::unordered_map<DtUniqueID, DtOsgArticulatedModel* >
42 
43  typedef std::unordered_map<DtUniqueID, DtSceneObject* >
45 
46  public:
48  static DtLightIndicatorManager& instance(DtDe& anIG);
49 
51  virtual ~DtLightIndicatorManager();
52 
54  DtLightIndicatorManager() = delete;
58  DtLightIndicatorManager& operator=(const DtLightIndicatorManager& rhs) = delete;
59 
60  public:
61 
64  virtual void updateLightIndicatorManager(const float budgetMs);
65  public:
66 
67  boost::signalslib::signal<void ( DtLightIndicatorData& )> signal_LightIndicatorDeleted;
68  boost::signalslib::signal<void ( DtLightIndicatorData& )> signal_LightIndicatorCreated;
69 
70  protected:
72 
73  protected:
75  virtual void slot_coordinateSystemChanged();
76 
78  virtual DtVector geodeticToCig(const DtVector& pos) const;
79 
81  virtual void slot_LightIndicatorCreated(DtLightIndicatorData& lightIndicatorData);
82 
84  virtual void slot_LightIndicatorDestroyed(DtLightIndicatorData& lightIndicatorData);
85 
87  virtual std::size_t hashPos(DtVector& pos) const;
88 
90  // default is SignLightIndicator
91  virtual void setDefaultModelDefinition(const std::string& modelDef);
92 
95  virtual void createLightIndicator(DtLightIndicatorData& signData);
96 
98  virtual void destroy(DtLightIndicatorData& signData);
99 
100  public:
102 
104 
105  // For creating DtOsgArticulated models on the main thread
106  tbb::concurrent_queue<DtLightIndicatorData> myCreateQueue;
107 
108  tbb::concurrent_queue<DtLightIndicatorData> myDeleteQueue;
109 
111 
112  // The signs are DtOsgArticulatedModels, they are put under a DtSceneObject
113  // so that they work when instancing is off
114  // The DtSceneObject doesn't have the transform, the articulated model does
116 
118 
121  DtCoordinateSystem* myCoordinateSystem = nullptr;
122  };
123 }
Contains makVrv::DtAerodromeNode class.
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
tbb::concurrent_queue< DtLightIndicatorData > myCreateQueue
Definition: DtLightIndicatorManager.h:106
SceneObjectMap mySceneObjs
Definition: DtLightIndicatorManager.h:115
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
The elements that make up a taxiway sign.
Definition: DtAerodromeNode.h:95
Contains makVrv::DtDe class.
Definition: DtLightIndicatorManager.h:36
Contains makVrv::DtVirtualBaseClass class.
std::string myDefaultLightIndicatorModelDefinition
Definition: DtLightIndicatorManager.h:117
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
std::unordered_map< DtUniqueID, DtSceneObject * > SceneObjectMap
Definition: DtLightIndicatorManager.h:44
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
Base class to provide boost signal/slot management.
std::unordered_map< DtUniqueID, DtOsgArticulatedModel * > LightIndicatorsMap
Definition: DtLightIndicatorManager.h:41
Contains makVrv::DtUniqueID type.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
boost::signalslib::signal< void(DtLightIndicatorData &)> signal_LightIndicatorDeleted
Definition: DtLightIndicatorManager.h:67
LightIndicatorsMap myLightIndicators
Definition: DtLightIndicatorManager.h:110
boost::signalslib::signal< void(DtLightIndicatorData &)> signal_LightIndicatorCreated
Definition: DtLightIndicatorManager.h:68
DtSignalConnectionManager myConnections
Definition: DtLightIndicatorManager.h:103
DtDe & myDe
Definition: DtLightIndicatorManager.h:101
tbb::concurrent_queue< DtLightIndicatorData > myDeleteQueue
Definition: DtLightIndicatorManager.h:108

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)