All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PropModel.h
1 #pragma once
2 
3 #include "Rendering.h"
4 #include "InteriorEntityData.h"
5 #include "Positioning.h"
6 #include "CallbackCollection.h"
7 #include "Collision.h"
8 #include "Interiors.h"
9 #include "LatLongAltitude.h"
10 #include "IProp.h"
11 #include "PropGeometry.h"
12 #include <string>
13 
14 namespace Eegeo
15 {
16  namespace Resources
17  {
18  namespace Interiors
19  {
20  class PropModel : public IProp, private Eegeo::NonCopyable
21  {
22  public:
23 
24  PropModel(
25  const IProp::IdType id,
26  const std::string& name,
27  double headingDegrees,
28  const std::string &propGeometryId,
29  Positioning::IPointOnMap* pPointOnMap,
30  PropRenderableService& propRenderableService);
31 
32  ~PropModel();
33 
34  IdType GetId() const override;
35 
36  const std::string& GetName() const override;
37 
38  InteriorId GetInteriorId() const override;
39 
40  int GetFloorId() const override;
41 
42  double GetElevation() const override;
43 
44  void SetElevation(double elevation) override;
45 
46  Positioning::ElevationMode::Type GetElevationMode() const override;
47 
48  void SetElevationMode(Positioning::ElevationMode::Type elevationMode) override;
49 
50  Space::LatLong GetCoordinate() const override;
51 
52  void SetCoordinate(const Space::LatLong& coord) override;
53 
54  double GetHeadingDegrees() const override;
55 
56  void SetHeadingDegrees(double headingDegrees) override;
57 
58  const std::string& GetPropGeometryId() const override;
59 
60  void SetPropGeometryId(const std::string& propGeometryId) override;
61 
62  m44 CalculateTransformMatrix(const dv3& rootEcef) const override;
63 
64  IPropPositionChangedEvent& GetPositionChangedEvent() override;
65 
66  private:
67 
68  void OnPointOnMapChanged();
69 
70  const IProp::IdType m_id;
71  std::string m_name;
72  double m_headingDegrees;
73  std::string m_propGeometryId;
74  Positioning::IPointOnMap* m_pPointOnMap;
75  PropRenderableService& m_renderableService;
76  Helpers::TCallback0<PropModel> m_pointOnMapChanged;
77  Helpers::TEvent1<IPropPositionChangedEvent> m_propPositionChangedEvent;
78  };
79  }
80  }
81 }