All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TransportPositionerModelController.h
1 #pragma once
2 
3 #include "Transport.h"
4 #include "Types.h"
5 #include "Positioning.h"
6 #include "VectorMath.h"
7 #include "TransportPositionerTypes.h"
8 #include "ICallback.h"
9 #include "Streaming.h"
10 #include "TransportPositionerModelRepository.h"
11 
12 #include <unordered_set>
13 
14 namespace Eegeo
15 {
16  namespace Transport
17  {
18  class TransportPositionerModelController : public TransportPositionerModelRepository::ObserverType, private Eegeo::NonCopyable
19  {
20  public:
22  TransportPositionerModelRepository& positionerModelRepository,
23  ITransportPositionerMatcher& navGraphMatcher,
24  ITransportPositionerModelInputChangedEvent& positionerModelInputChangedEvent,
25  Positioning::PositioningViewComponentChangedEvent& positioningViewComponentChangedEvent,
26  ITransportGraphChangedEvent& transportGraphChangedEvent);
27 
29 
30  void Update(float deltaTime);
31  private:
32 
33  void OnPositionerModelInputChanged(const TransportPositionerId& transportPositionerId);
34 
35  void OnPositioningViewComponentChanged();
36 
37  void OnTransportGraphChanged(const TransportGraphChangedMessage& message);
38 
39  void OnItemAdded(const ItemType& item);
40  void OnItemRemoved(const ItemType& item) {};
41 
42  TransportPositionerModelRepository& m_positionerModelRepository;
43  ITransportPositionerMatcher& m_navGraphMatcher;
44  ITransportPositionerModelInputChangedEvent& m_positionerModelInputChangedEvent;
45  Positioning::PositioningViewComponentChangedEvent& m_positioningViewComponentChangedEvent;
46  ITransportGraphChangedEvent& m_transportGraphChangedEvent;
47 
48 
50  Helpers::TCallback0<TransportPositionerModelController> m_positioningViewComponentChangedHandler;
52 
53  bool m_positioningViewComponentDidChange;
54 
55  bool m_graphChanged;
56 
57  std::unordered_set<TransportPositionerId> m_positionerModelIdsNeedingUpdate;
58  };
59  }
60 }