All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TransformedCellModelAnchoredLabel.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "IAnchoredLabelSource.h"
7 #include "Labels.h"
8 #include "ShapedText.h"
9 #include "VectorMath.h"
10 #include "LabelCellModelFeature.h"
11 #include "LabelCellModelFeatureContainer.h"
12 
13 
14 #include <string>
15 #include <vector>
16 
17 
18 namespace Eegeo
19 {
20  namespace Labels
21  {
22 
24  {
25  public:
26  TransformedCellModelAnchoredLabel(const IAnchoredLabel& sourceAnchoredLabel);
27 
28  IdType GetId() const { return m_sourceAnchoredLabel.GetId(); }
29 
30  const std::string& GetEntityName() const { return m_sourceAnchoredLabel.GetEntityName(); }
31 
32  const LabelAnchorCategory& GetLabelAnchorCategory() const { return m_sourceAnchoredLabel.GetLabelAnchorCategory(); }
33 
34  void GetShapedGlyphs(std::vector<Text::ShapedGlyph>& shapedGlyphs) const { m_sourceAnchoredLabel.GetShapedGlyphs(shapedGlyphs); }
35 
36  const Icons::IconDefinition* GetIconDefinition() const { return m_sourceAnchoredLabel.GetIconDefinition(); }
37 
38  dv3 GetEcefAnchorPosition() const;
39 
40  v3 GetAnchorOffset() const;
41 
42  m44 CalcFeatureAlignedAnchorBasisEcef(float environmentFlatteningScale) const;
43 
44  Geometry::AxisAlignedBox2 GetLocalTextBounds() const { return m_sourceAnchoredLabel.GetLocalTextBounds(); }
45 
46  float GetConstraintRadiusEcef() const { return m_sourceAnchoredLabel.GetConstraintRadiusEcef(); }
47 
48  bool CanCacheAnchorOffset() const { return false; }
49 
50 
51  const IAnchoredLabel& GetSourceAnchoredLabel() const { return m_sourceAnchoredLabel; }
52 
53  void SetTransformedOffset(const v3& tranformedAnchorOffset);
54 
55  void SetShouldDraw(bool shouldDraw);
56 
57  bool ShouldDraw() const { return m_shouldDraw; }
58 
59  int GetSubPriority() const { return m_sourceAnchoredLabel.GetSubPriority(); }
60 
61  private:
62  v3 m_tranformedAnchorOffset;
63  const IAnchoredLabel& m_sourceAnchoredLabel;
64 
65  bool m_shouldDraw;
66  };
67  }
68 }